what is this for?
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 4 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:MrDJay (等级:10 - 炉火纯青,发帖:10172) 发表:2003-05-13 16:30:42  楼主  关注此帖
A C++ problem about arrayI am a beginner of C++ programming. When I am learning the array, I copied a program from a book and cannot be executed. I don't know what is wrong? Please help me!!! #include void main() { int max_element(); int n, a[10]; int max; for(n=0; n>a[n]; max=max_element(a, 10); cout (more...)
what is this for?
int max_element();
Ever Thine, Ever Mine, Ever Ours
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
作者:MrDJay (等级:10 - 炉火纯青,发帖:10172) 发表:2003-05-13 16:33:29  2楼
what is this for?int max_element();
guess it is the problem
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
作者:MrDJay (等级:10 - 炉火纯青,发帖:10172) 发表:2003-05-14 21:42:38  3楼
You should declare the function before you use itmain() is an exception. All the other functions need to be declared before use. Just put your function prototype at the beginning of the program. BTW: It's better to use than (more...)
is it not backward compatible de mah?
not very sure, please teach me more :)
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
作者:MrDJay (等级:10 - 炉火纯青,发帖:10172) 发表:2003-05-15 09:18:36  4楼
It seems that you are really new to C/C++Functions need to be declared before use, this is the basic rule for C/C++.
thanks :$
always java oriented :$
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版所有回复从这里展开收起列表
论坛导航 -> 华新鲜事 -> 求学狮城 | 返回上一页 | 本主题共有 4 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码