|
-
Oct 27th, 2002, 07:37 PM
#3
Thread Starter
New Member
My 16-year old friend figured out how to do this. Here's the code he used:
{
ifstream fin("assign_07_in.txt");
if (!fin.is_open())
exit(1);
int RoadNS[70] = { 0 };
int RoadWE[70] = { 0 };
fin.ignore(100, '\n');
int temp_input;
int i = 0;
while (fin >> temp_input && temp_input != -999)
{
RoadNS[i] = temp_input;
i++;
}
fin.get();
i = 0;
fin.ignore(100, '\n');
while (fin >> temp_input && temp_input != -999)
{
RoadWE[i] = temp_input;
i++;
}
fin.close();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|