/getline_after_cin_ver1.cpp Secret
Created
November 13, 2016 03:05
getline_after_cin_ver1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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