Skip to content

Instantly share code, notes, and snippets.

@justimchung
Created November 13, 2016 03:05
getline_after_cin_ver1
#include<iostream>
#include<string>
using namespace std;
void main()
{
int value;
cin >> value;
for (int i = 0; i < value; i++)
{
string s;
getline(cin, s);
cout << "[output] string " << i+1 << ": \"" << s + "\""<< endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment