Skip to content

Instantly share code, notes, and snippets.

@ernado
Created April 14, 2013 12:28
Show Gist options
  • Save ernado/5382528 to your computer and use it in GitHub Desktop.
Save ernado/5382528 to your computer and use it in GitHub Desktop.
using namespace std;
const int BUFF = 256;
std::string reads(const std::string& message, istream &in)
{
char s[BUFF];
cout << message;
in.getline(s, BUFF);
return s;
}
void main() {
system("chcp 1251 > nul");
string n;
n = reads("Введите имя: ", cin);
cout << "Введено: " << n << endl;
system("pause");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment