473,383 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Implicit Declaration of Function Printf()

When i try to compile the following program, it says
"warning: implicit declaration of function 'printf'"
Heres the source code

Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     prinf("Hello World");
  6.     return 0;
  7.  
  8. }
Nov 15 '15 #1
4 12554
Two reasons i can think of
1. In your actual source code you have not included
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2.  
2. The installation is not proper and the compiler is not able to find the stdio.h file or may be it is pointing to different stdio.h file
Nov 15 '15 #2
weaknessforcats
9,208 Expert Mod 8TB
Actually, it's printf not prinf.
Nov 15 '15 #3
In the warning message it correctly refers to printf.so, I was not sure which is correct?
Nov 16 '15 #4
weaknessforcats
9,208 Expert Mod 8TB
An implicit declaration means to call a function without previously telling the compiler that this is a valid function. You tell the compiler the function is valid by a)coding the function before you call it the first time or b)using a function prototype if the code for the function does not appear before the first call.


There is no way that the compiler would know you meant printf when prinf is a perfectly good function name.

Maybe you could post your warning.
Nov 16 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason | last post by:
Hi, Im running windows xp pro and compiling using dev c++ 4. I have the following situation: #include <iostream> #include <string> using namespace std; int main() {
2
by: nick | last post by:
the following is my programming code and compile message why the warning message arise, have i done somethings wrong? #include<stdio.h> typedef struct card{ int abc; }card;
7
by: Paminu | last post by:
On a gentoo linux system i don't get any warnings when I comlpile this code: #include <stdio.h> typedef struct test { void *content; struct test_ *bob; } test_;
6
by: Johs32 | last post by:
I get this warning: warning: incompatible implicit declaration of built-in function 'printf' because I use printf in a function that I include in a .h file that is included by other files...Do...
5
by: Christian Christmann | last post by:
Hi, in one file I've a function that is used by another file containing the main function: file1.c: .... void test( int a ) { ... } ....
14
by: UNCManiac37 | last post by:
Hi, I'm very new to coding, so this is a newbie question. I'm trying to print out a banner using functions instead of main: int main () { banner1 (); } void banner1 (void) { cout...
3
by: samdomville | last post by:
hello...upon compilation, i get a warning: "warning: implicit declaration of funciton funciton_name" what, techicallly, is an implicit declaration? how/where would i look to track down the error?...
1
by: samdomville | last post by:
Hello - I have a .c file that gives me a warning "implicit declaration of function function_name". However, I have #included the header file that #defines that funciton, so how is it possible to...
4
by: sam123456789 | last post by:
implicit declaration of function please tell me what im doing wrong. #include <stdio.h> #include <stdlib.h> #include <conio.h> int main(int argc, char *argv) {
1
by: john124 | last post by:
I am running Mac OS X Ver. 10.7.5 and when I try to compile this simple program I get this error when I try to fprint to the file: implicit declaration of function 'printf' is invalid in C99 ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.