That would be correct. Read the last sentence of my last post. You can't use the extraction operator if your string has whitespace characters. You will probably want to use getline(), but be aware if the user enters data like:
100
James
345
100
John Doe
234
You may have problems when switching between the extraction operator and getline() because the extraction operator will leave the new line character in the input buffer, that you'll need to extract.
Something like:
1 2 3
std::cin >> accountNumber;
getline(std::cin >> std::ws, accountName); // Consume any leading ws.
std::cin >> accountBalance;
it might be better to set up a struct/class capturing the Number, Name, Balance data-members, overload the ctor to create an instance of this type with input data and overload the stream insertion operator << to send the object to a file