compile error on std::string(ptr.get())
Dear Linux c/g++ programers:
when I tried to test/compile a piece msvc++ workable code on my g++4.5.2 on linux 2.6.38-10 I got compile errors root@eric-laptop:/home/eric/cppcookbook/ch14# g++ Example14-8.cpp In file included from Example14-8.cpp:9:0: xerces_strings.hpp: In function ‘std::string toNative(const XMLCh*)’: xerces_strings.hpp:26:34: error: expected initializer before ‘<’ token xerces_strings.hpp:27:24: error: ‘ptr’ was not declared in this scope ------------------------------- my xerces_strings.hpp ------------26, 27---------- Code:
boost::scoped_array<char> ptr<xercesc::XMLString::transcode(str)); used in XercesString(ptr.get()); looking to see experts' help and thanks a lot in advance, Eric |
There's an obvious syntax error in the first line. You need to look at what the errors say, not just at the line numbers.
Kevin Barry |
All times are GMT -5. The time now is 06:27 PM. |