c语言 调用函数例子,为什么会报错啊?
#include"stdio.h"main(){printst();print_hello();printst();}printst(){printf("********...
#include "stdio.h"
main()
{
printst();
print_hello();
printst();
}
printst()
{
printf("****************\n");
}
print_hello()
{
printf("HELLO!\n");
}
我想输出如下:
****************************
HELLO!
****************************
错误为
: error C2065: 'printst' : undeclared identifier
: error C2065: 'print_hello' : undeclared identifier
: warning C4508: 'main' : function should return a value; 'void' return type assumed
: error C2373: 'printst' : redefinition; different type modifiers
: warning C4508: 'printst' : function should return a value; 'void' return type assumed
: error C2373: 'print_hello' : redefinition; different type modifiers
: warning C4508: 'print_hello' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
我用的vc6.0 展开
main()
{
printst();
print_hello();
printst();
}
printst()
{
printf("****************\n");
}
print_hello()
{
printf("HELLO!\n");
}
我想输出如下:
****************************
HELLO!
****************************
错误为
: error C2065: 'printst' : undeclared identifier
: error C2065: 'print_hello' : undeclared identifier
: warning C4508: 'main' : function should return a value; 'void' return type assumed
: error C2373: 'printst' : redefinition; different type modifiers
: warning C4508: 'printst' : function should return a value; 'void' return type assumed
: error C2373: 'print_hello' : redefinition; different type modifiers
: warning C4508: 'print_hello' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
我用的vc6.0 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询