I'm just trying to do a simple test run of executing a program and passing it two parameters.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char* argv[])
{
start = atoi(argv[1]);
stop = atoi(argv[2]);
for(start; start < stop; start++)
{
printf("hello");
}
}
Why is this not working? When I compile it says start and stop is not declared. And when I try to run it as a executable like this ./file 3 5 it says "." is not recognized as an internal or external command. I'm using mingw on my widows cmd prompt. Any ideas why it wont run like I want? That being: compiling, entering executable ./file 3 5 then it running like normal?
int startandint stopthe first time you assign to them.