Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: OT: C++ code question.

Author: macaroni

Date: 03:02:37 11/06/03

Go up one level in this thread


Hi, thanks for helping me, but I still can't get it to work :(

#include <iostream.h>
#include <fstream.h>
using namespace std;
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],120))
 {
  BookSize++;
 }
 cin >> x;
 return 0;
}

this gives me a compiler error....i'm a really bad c++ programmer. it doesn't
like the 'std::string BookLines[50000];' bit, don't know why, don't know how
that line of code should work or what it does, but anyway,
thanks again



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.