运行VC++,提示出错.懂的人教下我,小弟叩谢拉

yinhang0914 yinhang0914 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我用运行的程序是,很简单,就是求两个数中最大的一个 ,程序本身没有问题.
#include <iostream.h>

vodi main()

{ float a,b;

cout<<"Enter two float number :"<<endl;

cin>>a>>b;

if(a>b)

cout<<"max is :"<<a<<endl;

else

cout<<"max is :"<<b<<endl;
}

运行程序提示的结果提示出错,它的提示是
Compiling...
pp.cpp
e:\program files\microsoft visual studio\myprojects\pp\pp.cpp(3) : error C2146: syntax error : missing ';' before identifier 'main'
e:\program files\microsoft visual studio\myprojects\pp\pp.cpp(3) : error C2501: 'vodi' : missing storage-class or type specifiers
e:\program files\microsoft visual studio\myprojects\pp\pp.cpp(3) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.

pp.exe - 1 error(s), 0 warning(s)

大哥大姐帮忙拉,小弟谢谢拉!!!
...全文
评论 9
收藏 已收藏
分享
返回顶部