|
인터넷강의를 구해서 보다가
터보 c++ 3.1버전으로 아래것을 컴파일 하니까
#define PI 3.14159
main()
{
int num = 5;
float rat = 13.5;
int cost = 31000;
printf("The %d woman drank %f glasses of rat.\n",num,rat);
printf("The value of pi is %f.\n",PI);
printf("Farewell! thouart too dear for my possessing, \n",PI);
printf("%c%d \n",'$',cost);
}
10번쨰쭐 printf("The %d woman drank %f glasses of rat.\n",num,rat);
이부분이 function 'printf'should have a prototyep 라는 에러를 내는데 이거
무슨 문제죠? 위에 쓰여진것은 강의 내용을 그대로 써노은것입니다.
강의에서는 분명 실행결과ㅏ를 보여주었는데.. 컴파일러 문제인가요?
결과는.. The 5 women drank 13.500000 glasses of rat. The value of po is 3.141590. Farewell! thouart too dear for my possessing. $31000 이건데..답변부탁드립니다^^
|