NO

Author Topic: What is the interpretation of this error message  (Read 3926 times)

boral

  • Guest
What is the interpretation of this error message
« on: June 03, 2012, 09:56:55 AM »
I was writing a program and while I compiled it I got this error.
I:\C programs\Program for finding first four central moments for grouped frequency distribution.c( 8 ): warning #2027: Missing prototype for 'printf'.
Will any one please explain in details what these numbers mean in the error message?
c( 8 ) and #2027

Offline Vortex

  • Member
  • *
  • Posts: 867
    • http://www.vortex.masmcode.com
Re: What is the interpretation of this error message
« Reply #1 on: June 03, 2012, 12:01:21 PM »
It looks like that there is no any prototype specified for printf in your code. Did you include this line?

Code: [Select]
#include <stdio.h>
Code it... That's all...

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: What is the interpretation of this error message
« Reply #2 on: June 03, 2012, 12:20:34 PM »
Will any one please explain in details what these numbers mean in the error message?
c( 8 ) and #2027
8 is the line number in the editor, where the error occurs.
#2027 is the number of the error message " Missing prototype for 'printf'".
best regards
 Alex ;)

boral

  • Guest
Re: What is the interpretation of this error message
« Reply #3 on: June 03, 2012, 04:47:44 PM »
Yes Vortex , I have included that line.
Thank you AlexN for your answer.

CommonTater

  • Guest
Re: What is the interpretation of this error message
« Reply #4 on: June 03, 2012, 05:01:27 PM »
Hi Boral... About the filename...

"I:\C programs\Program for finding first four central moments for grouped frequency distribution.c"

While this is technically not a bad filename, you should be aware that many compiler's tool chains will have a problem with the length of it and many will trip over the spaces.  If there's any chance your code will be compiled by any other compiler, you should adopt a different naming convention for your files...  For example, most people call the main source file in their projects "main.c" ....




boral

  • Guest
Re: What is the interpretation of this error message
« Reply #5 on: June 03, 2012, 07:26:15 PM »
Thanks CommonTater for your valuable advice.