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:
Code:
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;
}
Sujan.exe is in the C drive
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?