Help with two questions

I am taking a intro to C++ programing, and really I am a little lost. Here are two questions I have not idea how to do. Please Help!

Write a program segment that reads six integer values from a file and writes them to the screen, three numbers per output line. The file is organized one value to a line.




35. Write a code segment that inputs the first letter of each of the following names into the char variables first, second, and third.
Susy
Chris
Michael
What have you written so far? Let's focus on the first problem for now.
welcome to c++. i would suggest to read the file reading\writing section in any tutorial.
You can read any line or entire file or first char of a line.

i.e
Read a single line with GetLine(), save it in a std::string
Then access the first char from this string with subscript operator and feed it to the desired char variable .

please read at
http://www.cplusplus.com/reference/string/string/getline/
Topic archived. No new replies allowed.