Skip to content

Instantly share code, notes, and snippets.

@marcoscastro
Created December 6, 2014 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcoscastro/2d5e4c529b36ba677ad3 to your computer and use it in GitHub Desktop.
Save marcoscastro/2d5e4c529b36ba677ad3 to your computer and use it in GitHub Desktop.
C++ - Função get
#include <iostream>
#define MAX 10
using namespace std;
int main(int argc, char *argv[])
{
char nome[MAX];
cout << "Digite o seu nome: ";
//cin >> nome;
cin.get(nome, MAX);
cout << "Oi " << nome << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment