Hi,
When I pass command line arguments to my main method, I’m getting the following error:
Error when parsing command line argument string
But if I remove the last line of my main method which is :
CUT_EXIT(argc, argv);
then there is no problem.
Can anyone explain why this is happening?
Thanks…
Hi,
When I pass command line arguments to my main method, I’m getting the following error:
Error when parsing command line argument string
But if I remove the last line of my main method which is :
CUT_EXIT(argc, argv);
then there is no problem.
Can anyone explain why this is happening?
Thanks…
[snapback]389874[/snapback]
Possible that you did NOT pass the arguments to main as “argc” and “argv” :-)
of course I did.
In my program I make use of the command line arguments and I get the correct output. Its only after the output is printed I’m getting this error.
I got the similar error, I use the command line just as you do. Just can’t figure out why? Did you solve this problem yet?
I got the similar error, I use the command line just as you do. Just can’t figure out why? Did you solve this problem yet?
[snapback]434382[/snapback]
since the CUT_EXIT is something like this
define CUT_EXIT(argc, argv) \
if (!cutCheckCmdLineFlag(argc, (const char**)argv, "noprompt")) { \
printf("\nPress ENTER to exit...\n"); \
fflush( stdout); \
fflush( stderr); \
getchar(); \
} \
exit(EXIT_SUCCESS);
I add exit(EXIT_SUCESS); at the end of main() instead of CUT_EXIT
It works out fine External Media