참고한 내용이 잘못된것 같네요.
#include <conio.h> // getch()
#include <iostream.h>
int add (int x , int y)
{
cout << "In Add(), received " << x << " and " << y << "\n" ;
return (x+y);
}
int main()
{
cout <<"I`m in main()!\n";
int a, b, c;
cout << "enter two numbers: ";
cin >> a;
cin >> b;
cout << "\n Calling Add()\n";
c = add(a,b);
cout << "\n back in main().\n";
cout << "c was set to " << c;
cout << "\n exiting... \n\n";
getch();
return 0;
}
노지성 님이 쓰신 글 :
: #include<iostream.h>
:
: int add (int x , int y)
: {
: cout << In Add(), received <<< x << and <<< y << "\n" ;
: return (x+y);
: }
:
: int main()
: {
: cout <<"I`m in main()!\n";
: int a, b, c;
: cout << "enter two numbers: ";
: cin >> a;
: cin >> b;
: cout << "\n Calling Add()\n";
: c = (a,b);
: cout << "\n back in main().\n";
: cout << "c was set to" <<c;
: cout << "\n exiting... \n\n";
: return 0;
: }
:
: 음 컴파일러는 자료실의 터보C++3.1 과 볼란드C++5.02(5.5 어떻게 패치하는지 모르겠습니다 ^ ^)
: 로 해봤는데 In Add 에서의 In이 오류가 납니다
: 무엇이 잘못된건지....
|