J
Jack
My program is about several thousands lines. It takes arguements from
the command line.
If no arguement is given, it should simply exist. Below is the
architectureof main() :
int main(int argc, char *argv[])
{
if( argc == 1 )
{
printf("NO ARGUEMENT\n");
exit(0);
}
//Other parts of the code
}
It also links with other libraries.
If no arguement is given on command line, it only outputs "NO
ARGUEMENT", then hangs there.
The exit(0) can not exit. Why exit(0) fails to exit from main()?
Thanks.
the command line.
If no arguement is given, it should simply exist. Below is the
architectureof main() :
int main(int argc, char *argv[])
{
if( argc == 1 )
{
printf("NO ARGUEMENT\n");
exit(0);
}
//Other parts of the code
}
It also links with other libraries.
If no arguement is given on command line, it only outputs "NO
ARGUEMENT", then hangs there.
The exit(0) can not exit. Why exit(0) fails to exit from main()?
Thanks.