August 12th, 2013, 06:45 AM
Join Date: Aug 2013
Time spent in forums: 10 h 27 m 37 sec
Reputation Power: 1
C++ vector lineparser
I'm trying to code some C++ program that makes a vector open a file, and print each line with its number.
using namespace std;
int main(int argc, char * argv)
for(int i = 0; i < v.size(); i++)
cout << i << " " << v[i] << endl;
But its just not printing anything. By the way the .txt is in the same directory and I made a similar program with vectors made of floats but that doesn't open files.
Some insight? Thanks
EDIT: Now made it a project on code::blocks and put the .Txt in the .Exe repertory, and avg says its a virus...