Error The Function Printf Must Have A Prototype
Contents |
prototype Go to Page... Page 1 of 2 1 2 > Thread Tools Display Modes Apr 26th, 2010, 3:59 AM #1 VanGogh Newbie Join Date: Apr 2010 Posts: 21 Rep Power: 0 Function 'printf' should have a prototype im making my first steps in C programming, function should return a value and as i was trying to execute my first lines, it seems that i have a problem,
Function Should Have A Prototype In C Error
and i couldnt find answers in the book. i tried to run a simple calculation: when i compiled, i got the following error: "Function 'printf' should prototype of scanf in c have a prototype" (as you can also see in the pic above). can anyone please point me to the problem? and please use simple language, i'm a beginner, as you probably noticed. thanks in advance. VG. VanGogh View Public Profile Find More printf prototype in c Posts by VanGogh Apr 26th, 2010, 5:19 AM #2 Adak Hobby Coder Join Date: May 2006 Posts: 1,181 Rep Power: 12 Re: Function 'printf' should have a prototype C is a language that is used on many different types of devices. Many don't have a standard display device. So you need to tell your compiler that YOU DO have a stdio device by adding this line to the top of your program: (Toggle Plain Text) #include
Prototype Error In Turbo C++
code here */ //fatal errors return 1 printf("\n\n\t\t\t press enter when ready"); i = getchar; ++i; //holds the console window open //& stops a warning from TC return 0; } #include
help? Post your question and get tips & solutions from a community of 418,546 IT Pros & Developers. It's quick & easy. Error: printf statement should contain prototype P: 13 goutham1 hai if we will take a void*p and int*q and we write q=p. then what will be the output in c and c++ can any body help me iam starting my c programming. i started my basic programme prototype for printf in turbo c that is adding two numbers when i compiled my programme in cpp in the print f statement it is telling printf
Malloc
statement should contain prototype can any body please help me May 13 '07 #1 Post Reply Share this Question 4 Replies 100+ P: 1,806 DeMan assuming you are including stdio.h, it sounds like you have a http://www.programmingforums.org/thread27344.html slight syntax error (specifically the way you are trying to display the output is not quite correct. It should probably look something like this (I am assuming integer addition here) Expand|Select|Wrap|Line Numbers printf("Sumof%dand%dis%d",a,b,(a+b)); May 13 '07 #2 reply P: 13 goutham1 assuming you are including stdio.h, it sounds like you have a slight syntax error (specifically the way you are trying to display the output is not quite correct. It should probably https://bytes.com/topic/c/answers/646095-error-printf-statement-should-contain-prototype look something like this (I am assuming integer addition here) Expand|Select|Wrap|Line Numbers printf("Sumof%dand%dis%d",a,b,(a+b)); my programme is like this main( ) { int a,b,c; a=5;b=6; c=a+b; printf("%d",c); } ihad changed it and seen the programme but the same error it is sowing please help me again it shows the msg like printf should have a prototype. May 14 '07 #3 reply Expert 2.5K+ P: 3,652 Ganon11 You are probably not including the proper header file. Before you type main(), type the following line: Expand|Select|Wrap|Line Numbers #include
Post your question and get tips https://bytes.com/topic/c/answers/946599-function-printf-should-have-prototype & solutions from a community of 418,546 IT Pros & Developers. It's quick & easy. the function printf() should have a prototype P: 1 Dhanu Dhanu im getting a msg dat.............. here, printf("the stack is underflow"); in dis line it shows the function printf should have a prototype..... wt in c is needed there,,, Feb 4 '13 #1 Post Reply Share this Question 2 Replies Expert Mod 10K+ P: 12,110 Rabbit Did you remember to include stdio? Feb 4 '13 #2 reply P: 5 muthuct8 Expand|Select|Wrap|Line Numbers #include