Reputation: 21
Sorry for my English. I need to take the value of the parameters of the main function. I said in Bison:
int main (int argc, char ** argv)
I compile in Windows:
file.exe <input.txt
=>
argc = 1
and
argv = "file.exe"
Why? Thank you.
Upvotes: 0
Views: 229
Reputation: 241
Try "file.exe input.txt", without the "<": argv[1] will be "input.txt".
Upvotes: 1