Re: [Dev-C++] Re: newbie string parsing question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2004-08-18 09:07:25
|
Pascal wrote: > Why not using the fully std c++ function like <cin> to manipulate =20 > string input in file? Indeed, that would be the simplest. Using C for string manipulation is ve= ry dangerous, and=20 awkward. Use the >> operator, like this: file >> first_name; file >> last_name; ... where "file" is an "ifstream" and "xxx_name" is a "string". -- Greetings, Bal=E1zs |