![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programmer
Join Date: Sep 2005
Location: Anchorage, Alaska
Posts: 37
Rep Power: 0
![]() |
couldn't you try something like:
#include <iostream>
using namespace std;
int main()
{
char address;
address = 'C:\\Program Files\\alcohol soft\\alcohol 120\\AxCmd.exe E: /u'
system(address);
system("PAUSE");
return EXIT_SUCCESS;
}#include <iostream>
using namespace std;
#define address 'C:\\Program Files\\alcohol soft\\alcohol 120\\AxCmd.exe E: /u'
int main()
{
system(address);
system("PAUSE");
return EXIT_SUCCESS;
}Last edited by Yarvin; Apr 26th, 2006 at 4:42 PM. |
|
|
|
|
|
#12 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#13 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
@Lich: if you do that, the ~1 trick might not work anymore.
@Yarvin: there are two problems with your solution: 1- '\' is considered an escape character that cannot be used in strings. To use it, we do '\\'. 2- System() will not accept spaces within the command string. |
|
|
|
|
|
#14 | |
|
Programmer
Join Date: Sep 2005
Location: Anchorage, Alaska
Posts: 37
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
|
#15 | |
|
Professional Programmer
|
@Yarvin: If you run a command like this in system(),
system("C:\\Program Files\\Cant be read\\CanUReadMe.exe");Quote:
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
|
#16 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,260
Rep Power: 5
![]() |
Personally, I don't use the system call, but my guess would be;
system("\"C:\\Program Files\\alcohol soft\\alcohol 120\\AxCmd.exe\" E: /u"); system("\"C:/Program Files/alcohol soft/alcohol 120/AxCmd.exe\" E: /u"); |
|
|
|
|
|
#17 |
|
Programmer
Join Date: Sep 2005
Location: Anchorage, Alaska
Posts: 37
Rep Power: 0
![]() |
Oh! Okay I get it now.... Thank you.
so using: System('"C:\Program Files" E: /u')I figured it would because the autocomplete in the command prompt just surrounds it by a pair of "". |
|
|
|
|
|
#18 | |
|
Expert Programmer
Join Date: Jun 2005
Posts: 893
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|