simple C question:

S

Sharon

I know it is simple but I don't know why the compiler says:
6 d:\ctest~1\1222\untitl~1.cpp implicit declaration of function `int
printf(...)'

so whats wrong with the code?


#include <stdlib.h>

int main()
{
char* str = "abc";
printf("%s\n", str);
system("PAUSE");
return 0;
}
 
M

Martin Ambuhl

Sharon said:
I know it is simple but I don't know why the compiler says:
6 d:\ctest~1\1222\untitl~1.cpp implicit declaration of function `int
printf(...)'

so whats wrong with the code?

You didn't #include <stdio.h>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top