R
Randy Yates
Why does this:
string AWord(string& line)
{
return line;
}
bool MYOBJECT::MyFunction(string &line)
{
int day;
istringstream(AWord(line)) >> day;
}
produce this:
cd e:\rr\thirdedition\import\
make -f import.mak TARGET=pc
g++ -c -DTARGET_PC -Wall -g -I /. -I /mingw/include/ -I /devstudio/vc/include -o ./pc/import.o -Wno-deprecated import.cpp
myfile.cpp: In member function `bool MYOBJECT::MyFunction(std::string&)':
myfile.cpp:845: parse error before `>>' token
make: *** [pc/myfile.o] Error 1
Compilation exited abnormally with code 2 at Sat Jan 01 23:43:37
???
--
% Randy Yates % "Midnight, on the water...
%% Fuquay-Varina, NC % I saw... the ocean's daughter."
%%% 919-577-9882 % 'Can't Get It Out Of My Head'
%%%% <[email protected]> % *El Dorado*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
string AWord(string& line)
{
return line;
}
bool MYOBJECT::MyFunction(string &line)
{
int day;
istringstream(AWord(line)) >> day;
}
produce this:
cd e:\rr\thirdedition\import\
make -f import.mak TARGET=pc
g++ -c -DTARGET_PC -Wall -g -I /. -I /mingw/include/ -I /devstudio/vc/include -o ./pc/import.o -Wno-deprecated import.cpp
myfile.cpp: In member function `bool MYOBJECT::MyFunction(std::string&)':
myfile.cpp:845: parse error before `>>' token
make: *** [pc/myfile.o] Error 1
Compilation exited abnormally with code 2 at Sat Jan 01 23:43:37
???
--
% Randy Yates % "Midnight, on the water...
%% Fuquay-Varina, NC % I saw... the ocean's daughter."
%%% 919-577-9882 % 'Can't Get It Out Of My Head'
%%%% <[email protected]> % *El Dorado*, Electric Light Orchestra
http://home.earthlink.net/~yatescr