Author: macaroni
Date: 15:01:35 11/06/03
Go up one level in this thread
this is very unusual....heres my new bit of code
#include <iostream>
#include <fstream>
#include <string>
int main()
{
int BookSize=0,x;
std::string BookLines[50000];
ifstream in("SEEBook");
if (!in)
{
cout << "Book not found!\n";
return 1;
}
while(in.getline(BookLines[BookSize]))
{
BookSize++;
}
cin >> x;
return 0;
}
this however crashes in a big way, telling me that ifstream is undeclared, cout
is undeclared and it still dislikes std::string BookLines[50000]. Seems like the
#include files are a bit dodgy? if I add the h again, it works except for the
std::string BookLines[5000]; on which it still fails to compile.
any ideas?
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.