Groups
Groups
Sign in
Groups
Groups
tw.bbs.comp.oop
Conversations
About
Send feedback
Help
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
請問c++的亂數選取:)
0 views
Skip to first unread message
看到許慧欣了
unread,
Apr 15, 2002, 6:05:39 AM
4/15/02
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
※ 引述《
supper...@redbbs.cc.ntut.edu.tw
( ~飛~ )》之銘言:
> 【 在
ptuhl...@bbs.cs.nthu.edu.tw
(愛在瘟疫漫延時) 的大作中提到: 】
> : 請問一下:
> : 我要寫一個1到100的整數隨機選取100次,
> : 程式寫好後, 剩一個錯誤, 可是不知怎麼修改, 還請網友幫忙:)
> : 程式如下:
> 把
> : {*(r+i) = int random(100); -------這裡說" parse error before '[ "
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 改成
> {*(r+i)=rand();
> 就可以嚕!!試試吧!!!
> : cout<<"(r+"<<i<<")="<<*(r+i)<<endl;
> : }
> : return(0);
> : }
初學c++, 不太會寫!!
謝謝你唷!!
--
※ Origin: 楓橋驛站<
bbs.cs.nthu.edu.tw
> ◆ From:
ccsun39.cc.NCTU.edu.tw
0 new messages