|
울프 님이 쓰신 글 :
: #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 << "\nCalling add()\n";
: c=add(a,b);
: cout << "\nBack in main().\n";
: cout << "c was set to" << c;
: cout << "\nExiting..\n\n";
: return 0;
: }
:
: 정말 간단하죠?-_-;;
: 이틀전부터 공부한지라..-_-;;
: 헤더파일을 conio.h로 바꾸고
바꾸는게 아니라, 추가하는 겁니다.
: main() 제일 아래부분에 getch()문을 삽입해도 안되네요
: 이런 에러가 나요ㅠ_ㅠ
:
: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
: func.cpp:
: Error E2451 func.cpp 5: Undefined symbol 'cout' in function add(int,int)
: Error E2451 func.cpp 11: Undefined symbol 'cout' in function main()
: Error E2451 func.cpp 14: Undefined symbol 'cin' in function main()
: Warning W8066 func.cpp 22: Unreachable code in function main()
: Warning W8004 func.cpp 23: 'c' is assigned a value that is never used in function main()
: *** 3 errors in Compile ***
:
: 제발 설명좀 ㅠ_ㅠ
그리고 헤더파일 선언 다음에
using namespace std;
문장을 넣어보세요.
|