How to read spaces in a string
Hi, im trying to read a whole sentence. Im trying this:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
struct ingresos{
float monto;
string concepto,rfc;
}ingreso[20];
void capturaIngresos(int pos){
cout<<endl;
cout <<"Concepto: ";
getline(cin,ingreso[pos].concepto);
cout <<"RFC: ";
cin>>ingreso[pos].rfc;
}
|
At trying to read "Concepto", it jumps to the next line.
Thanks in advance
thanks a lot =D
Topic archived. No new replies allowed.