Created
December 6, 2014 22:08
-
-
Save marcoscastro/2d5e4c529b36ba677ad3 to your computer and use it in GitHub Desktop.
C++ - Função get
This file contains 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> | |
#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