By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

simple C question:

P: n/a
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;
}
Nov 14 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
its ok now
pls ignore it
thx
Nov 14 '05 #2

P: n/a
Sharon wrote:
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>

--
Martin Ambuhl

Nov 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.