E
eric
Dear advanced c++ programers:
When i tried to compile a example code with some modification on
book(c++ cookbook) chapter 4, section 6: Splitting a String. by
suggestion of author change string to basic_string<T> to make the
example above a function template that accepts any kind of character
is trivial; just parameterize the character type.
book's example code is here
http://examples.oreilly.com/9780596007614/
-------------------------------
g++ Example4-10.cpp
Example4-10.cpp: In function ‘void split(const
‘std::basic_string<_CharT>::size_type’ because
‘std::basic_string<_CharT>’ is a dependent scope
Example4-10.cpp:11:30: error: expected ‘;’ before ‘i’
When i tried to compile a example code with some modification on
book(c++ cookbook) chapter 4, section 6: Splitting a String. by
suggestion of author change string to basic_string<T> to make the
example above a function template that accepts any kind of character
is trivial; just parameterize the character type.
book's example code is here
http://examples.oreilly.com/9780596007614/
-------------------------------
g++ Example4-10.cpp
Example4-10.cpp: In function ‘void split(const
Example4-10.cpp:11:3: error: need ‘typename’ beforestd::basic_string said:&)’:
‘std::basic_string<_CharT>::size_type’ because
‘std::basic_string<_CharT>’ is a dependent scope
Example4-10.cpp:11:30: error: expected ‘;’ before ‘i’