Debian Codegraph @

data/0.12-dev/src/Words.cpp

raw
1 #include "Words.h"
2 #include <strstream>
3 using namespace std;
4
5 Word::Word(const char* line)
6 {
7 istrstream ss(line);
8 ss >> d_name;
9
10 int x;
11 while(ss >> x)
12 {
13 d_meanings.push_back(x);
14 }
15 }
16
17 void extractWords(istream& file, vector<Word>& words)
18 {
19 char buf[64000];
20
21 while(file.getline(buf, 64000))
22 {
23 words.push_back(Word(buf));
24 }
25 }
26