g++ compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi
please help me
how to compiling this main with GCC, the GNU Compiler
i use g++ -pthread  -Wall main.cpp
but don't pass argument


main.cpp
int main(int argc, char *argv[]) {



   /* Verify the correct number of arguments were passed in */

   if(argc != 4) {

      fprintf(stderr, "USAGE:./main.out <INT> <INT> <INT>\n");

   }



   int mainSleepTime = atoi(argv[1]);
   int numProd = atoi(argv[2]);
   int numCons = atoi(argv[3]);


   exit(0);

}

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux