반응형
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #include <iostream> #include <cstdio> #include <string> using namespace std; /* //3. 변수 scope int x = 1; void func() { int x = 2; { int t = x; int x = 3; cout << ::x << endl; cout << t << endl; cout << x << endl; } }*/ int main() { /* int n; cin >> n; cout << "n :: " << n << endl; char str[20]; cin >> str; cout << "str :: " << str << endl; */ /* char tmp[20]; // 2. 입출력(개행이 오기전까지 모든 입력을 받음) gets_s(tmp); printf("gets_s :: %s\n\n", tmp); cin.getline(tmp, sizeof(tmp)); cout << "cin.getline :: " << tmp << endl; */ return 0; } // This source code Copyright belongs to Crocus // If you want to see more? click here >> | Crocus |
반응형
'Tutoring > C++' 카테고리의 다른 글
operator (0) | 2018.03.07 |
---|---|
참조, template (0) | 2018.03.02 |
class 및 상속 (0) | 2018.02.27 |
입출력, namespace (0) | 2018.02.26 |