it taught me alot, I learn by analyzing codes giving to me, and re looking them and changing them to different things.
ok I updated my code
Code:
ifstream f("test.txt");
f>>n;
f.close();
cin.get();
now i get these errors
Code:
1>c:\users\michael\documents\visual studio 2008\projects\combat arm console\combat arm console\combat arm console.cpp(34) : error C2061: syntax error : identifier 'n'
1>c:\users\michael\documents\visual studio 2008\projects\combat arm console\combat arm console\combat arm console.cpp(36) : error C2065: 'n' : undeclared identifier
I'm guessing I have to define N as a string? now how would I do that?
update..i guessing to use
char n to define n as a string
and if thats right my last error is
Code:
syntax error : missing ';' before identifier 'ifstream'