Skip to content

Instantly share code, notes, and snippets.

@tanvir002700
Created April 16, 2016 07:51
Show Gist options
  • Save tanvir002700/a6ae36f27b3a47b2105589ac9815abdf to your computer and use it in GitHub Desktop.
Save tanvir002700/a6ae36f27b3a47b2105589ac9815abdf to your computer and use it in GitHub Desktop.
#include<iostream>
#include<string>
#include<stdlib.h>
using namespace std;
int main()
{
string inp;
cin>>inp;
cout<<"First input: "<<inp<<endl;
cin.ignore();
getline(cin,inp);
cout<<"Second input: "<<inp<<endl;
printf("%s",inp.c_str());
return 0;
}
@tuhin2k
Copy link

tuhin2k commented Mar 13, 2019

gets and getline er moddhe difference ki? ar getline use korte cin er kaj ki?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment