28a-FileArray - ifstream input"c\ArrayData" int...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <fstream> #include <iostream> #include <string> using namespace std; class Object { public: int x; int y; string n; { file >> x; file >> y; file.ignore(); getline(file, n); } }; int main (void) { Object* objects[10];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ifstream input("c:\\ArrayData.txt"); int count = 0; while ( !input.eof() ) { Object* o = new Object(); //input >> o->x; //input >> o->y; o->LoadFromFile(input); objects[count++] = o; } cout << "Hello"; return 0; }...
View Full Document

This note was uploaded on 10/05/2011 for the course CS 37 taught by Professor Glenncuevas during the Summer '09 term at Irvine Valley College.

Ask a homework question - tutors are online