When I run the following code:
void main(int argc, char** argv)
{
if (argc != 2){
fprintf(stderr, "Usage: %s video-dir-path\n", argv[0]);
exit(-1);
}
XFishTracker ft(argv[1]);
int id = 0;
while (true)
{
id++;
...
...
It exits since the value of ARGC is obviously NOT 2. If I comment out the exit (-1) line, I get an ASSERTION ERROR. I think because the ARGC isn't 2, my program does not run or proceed. How do I initialize argc to 2 and make the program run, when it exits before I can even see the command prompt properly.
How do I make the command prompt stay and give two inputs so that argc == 2?