Hi, I created a C++ application called Sujan.exe. In its main method it requires a char array of size 8. here is a copy of my main:
Sujan.exe is in the C driveCode:int main(char s[9])//leave space for last character { cout<<s; //I'm not doing anything here, I just want to know //whether my program reads in the parameters return EXIT_SUCCESS; }
In command prompt I try to pass my parameters in various ways, all of which bring up access violations.
C:/Sujan.exe/"~+02~-03"
C:/Sujan.exe/~+02~-03
C:/Sujan.exe "~+02~-03"
C:/Sujan.exe ~+02~-03
wats my problem? Am I asking the wrong thing in my C++ program or is my command to the exe flawed so that I cannot access these parameters?



LinkBack URL
About LinkBacks


