void GetData(fstream& In, string& Name, double& Acres, int& Jars);
/*Pre: The stream in is open for input.
Post: Returns the name of less than or equal 29 characters, acres and
number of jars.
*/

I am using this function to pull names from an infile.
The first line of the infile looks like this: Orville's Acres, 114.8 43801. All I want is the name with no comma and if another name in my infile has more than 29 characters, i want it to output the name, but with no more than 29 characters. I will need to use a loop (while) to read it until comma or 29 characters whichever comes first. I am trying to use cin.get() to read the name one character at a time.

I hope somebody can help me!

Thanks,

Troy

Here is recent help given to one of your classmates:

http://www.daniweb.com/forums/post1070744.html#post1070744

commented: Thank you, That helps me out on the right track. but im getting errors in the compiler that is: could not deduce template argument and expects 2 arguments, 3 provided. it would be line 8 in your code. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.