如何在VC2010中编写一个自定义函数,然后调用这个函数。

2024-12-17 09:06:48
推荐回答(1个)
回答1:

你试试这个:
#include
void myfun()
{
printf("hello, world\n");
}
int main()
{
myfun();
return 0;
}

或者:
#include
int main()
{
void myfun();//////////////////////////声明

myfun();
return 0;
}
void myfun()
{
printf("hello, world\n");
}