Help!

File reading letters, proobly into a string
number to an int and
then I was thinking several numbers into an array.
Last edited on
Do you have anything started any code you can show? What part are you stuck?
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>

using namespace std;

string course;
int score;
int holes[27];

int main ()
{
//variable section


ifstream in_stream;

//print heading

in_stream.open("program.txt");


if (in_stream.is_open())
{
while (!in_stream.eof())
{


getline(in_stream,course);


in_stream >> score;

}
cout<<course;
}

in_stream.close();


This is what I have gotten started.
Last edited on
letters
1 number
multiple numbers
Last edited on
Topic archived. No new replies allowed.