I recently started learning the program.
#include<stdio.h>
# include <handy.h>
void humanA();
int main() {
humanA();
HgGetChar();
HgClose();
return 0;
}
void humanA() {
HgCircle (300, 75, 25);
HgLine (300, 50, 300, 25);
HgLine (275, 38, 325, 38);
HgLine (275, 38, 275, 25);
HgLine (325, 38, 325, 50);
HgLine (300, 25, 275, 0);
HgLine (300, 25, 325, 25);
HgLine (325, 25, 325, 0);
}
I'd like to make a prototype declaration and display it like this.
Warning is coming out.Please tell me what's wrong.
void humanA();
is interpreted as a "function declaration that is not a prototype declaration" if c specification, so it matches.)
In c++, void humanA();
is the same argument declaration as the empty function of the argument.Item="View questions tagged with 'c++'">c++ behave differently.
For gcc
, specifying -Wstrict-prototypes
displays three warnings for the proposed source code: warning:function decoding isn'ta protocol
.
© 2024 OneMinuteCode. All rights reserved.