C++
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
18
1
2
3
4
5
6
7
using namespace std;
8
9
int main ()
10
{
11
vector<string> word;
12
fstream file;
13
file.open("words.txt");
14
for (string s; file >> s; ) word.push_back(s); // add this to read things
15
cout << word[rand()% word.size()]<<endl;
16
return 0;
17
}
18
$ g++ prog.cc -Wall -Wextra -std=c++98 -pedantic
Start
goose
0
Finish