Readin text line by line

This is a discussion on Readin text line by line within the C++ Programming forums, part of the General Programming Boards category; I am writing programs for a Advanced Programming class. The classes are merged witht the kiddies learning True-BASIC, the C++ ...

Readin text line by line

I am writing programs for a Advanced Programming class. The classes are merged witht the kiddies learning True-BASIC, the C++ kids learn basicly on our own and code the BASIC programs to C++.

Being a noob at C++, I must inquire;

This week the BASIC kids were working on READ-DATA segments in thier class... But me and the other C++ kids thin these would be equivalent to arrays or strings or maybe even a class, we have no idea where to start. Here is a breif summery of the program we are supposed to write:

Write a program that has an internal datadase of 10 Colleges w/ mascots. Let the user input the number of colleges to display at one time... Here is what the output might look like;

Code:

Number of colleges to display: 2
College State Mascot:
---------------------------------------
UNL NE Huskers
Greenbay MN Packers

I wan to use a for loop to read a corresponding line of the file to the screen.. eg: you type "two" for how many colleges you want to display... And When you hit "Enter" it reads two lines of the "colleg.db" file to the screnn... each line having the info for the college.