- 论坛徽章:
- 0
|
// #include <iostream>;
#include <iostream>;
#include <vector>;
#include <string>;
/**
**
CC -n32 -experimental -I $EXTERN/include -DDEBUG ch01.1.3.c $EXTERN/lib32/libstd.so
a.out < input_file
Beginning execution of main()
word read: Shyly,
word read: she
word read: asks,
word read: "I
word read: mean,
word read: Daddy,
word read: is
word read: there?"
**
**/
int main()
{
#ifdef DEBUG
cout << "Beginning execution of main()\n";
#endif
string word;
vector< string >; text;
while ( cin >;>; word )
{
#ifdef DEBUG
cout << "word read: " << word << "\n";
#endif
text.push_back( word );
}
// ...
}
在vc 6的环境下编译
提示 string word 是 `string' undeclared (first use this function) |
|