implement getline

Wednesday, April 29, 2015

#include<iostream>
using namespace std;
int main()
{
    char name[10];
    cout<<"\nEnter your name: ";
    cin.getline(name,20);
    cout<<"\nYour name is ";
    cout.write(name,20);


}

No comments:

Post a Comment