Monday, December 10, 2007

How to use GETLINE( )

How to use GETLINE( )

To use GETLINE( )

#include

main( )

{

const int arr=20;

char name[arr], food[arr];

cout<<" Please Key -in Your Name here :";

cin.getline(name,arr);

cout<<"\n"<<" Please Enter Your Flavour Food : ";

cin.getline(food,arr);

cout<<" i treat you to eat "<<<">

cout<< "(Mr / Ms) "<

return 0;

}

Result :


No comments: