Can you only use getline with strings or can it be used with c-strings? For this assignment I cannot use strings and can only use c-strings or in other words character arrays.
Hmmm I am not sure how to approach this anymore. We haven't learned how to use the std:: thing I see everywhere so I cannot use that. Is there another way to do this?
Ok so apparently you can use cin.getline to work with cstrings. Heres the issue. Im working on a function that will fill each index of the array with my different structs. But im getting a "no matching member for call to 'getline'".
// From myfile, read characters into arr[i].name until either
// name_size characters have been extracted; or
// a comma is reached
myfile.getline(arr[i].name, name_size, ',');
Please DON'T delete your question after getting your answer. It makes this thread useless as a learning resource for other people. It's a selfish abuse of these forums.
Please go back and edit your post to restore the original question.