I'm going by a fairly old book here (I'm not particulary bothered, it's a great book), so that might be my problem, but does istream::getline() still exist? My compiler gives me an error when I tell it:
Code:
const int bsz = 30;
char* buf[bsz];
ifstream("test.txt");
initin.getline(buf, bsz);
"Could not find match for istream::getline(char * *, const int) in function main(int, char * *)"
Any help?
EDIT I think this may be because all my calls to getline() are inside while(strstr(etc.)) which the compiler is also telling me are erronous. Exact code:
Code:
const int bsz = 30;
char* buf[bsz]; //hold curr line
while(!strstr(buf,"<style"))
initin.getline(buf, bsz);
initin being: ifstream initin(argv[1]);
Giving: "Could not find a match for 'strstr(char * *, const int)' in function main(int, char * *)".