this code works fine, it counts lines as it should, but here i have the path already specified and what i want is that user could do that - so how can i do that? Ive tried with string and cstring input, but i get a conversion error.
I forgot to include <string> but that's just because I copied the code above but that wouldn't cause the program to terminate at the beginning. Are you running it correctly by typing the name of the executable followed by the name of a file? For example, for a file called file.txt and the executable I'll call linecount, I would type