我写的那里错了啊?

Randoll 2002-12-21 02:11:33
#include "stdafx.h"
#include <iostream.h>
#include <stdlib.h>
#include <time.h>

class choice
{
int x;
public:
choice();
void Se(void);
void show(void);
}
choice::choice();
{
x=0;
}

void choice::Se(void)
{
srand((unsigned)time(NULL));
x=rand()%101;

}
void choice::show(void)
{
cout<<x<<endl;
}


main()
{

choice Cho;
Cho.Se();
Cho.show();
return(0);
}

就是不能通过编译。~

他说我少写{

但是你们看到啦。没有少啊。

而且还说什么从定义什么。反正就是不能过。
谁帮我看看啊。
谢谢
...全文
41 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Randoll 2002-12-21
  • 打赏
  • 举报
回复
非常感谢。经典。~
windz 2002-12-21
  • 打赏
  • 举报
回复
:) yes!
rushman 2002-12-21
  • 打赏
  • 举报
回复
class 定义完要有一个分号。
class choice
{
int x;
public:
choice();
void Se(void);
void show(void);
}; <-- 这里

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧