J
Jeff
Im compiling code on Fedora and I get the following error:
202: error: expected `;' before 'itr'
this is in a .h file which has no .cpp file:
template < typename Tcharl, typename Tcharr >
inline std::basic_string<Tcharl>& CR_String::StrCpy
( std::basic_string<Tcharl> &dest, const std::basic_string<Tcharr>
&src )
{
std::basic_string<Tcharr>::const_iterator itr = src.begin();
<---- line 202
while ( itr != src.end() )
{
dest.append( 1, Tcharl(*itr) );
itr++;
}
return dest;
}
Compile flags: -Wall -g
Compiler g++ version 4.0.0
Ive compiled this same code on Solaris 10 and Windows 2003 just fine.
It seems to be having issues with Tcharr because if I change it to an
int,
its fine, however I havent been able to figure out how to properly fix
it
for Linux and why its occuring only on Linux and not Solaris or
Windows?
Thanks in advance
202: error: expected `;' before 'itr'
this is in a .h file which has no .cpp file:
template < typename Tcharl, typename Tcharr >
inline std::basic_string<Tcharl>& CR_String::StrCpy
( std::basic_string<Tcharl> &dest, const std::basic_string<Tcharr>
&src )
{
std::basic_string<Tcharr>::const_iterator itr = src.begin();
<---- line 202
while ( itr != src.end() )
{
dest.append( 1, Tcharl(*itr) );
itr++;
}
return dest;
}
Compile flags: -Wall -g
Compiler g++ version 4.0.0
Ive compiled this same code on Solaris 10 and Windows 2003 just fine.
It seems to be having issues with Tcharr because if I change it to an
int,
its fine, however I havent been able to figure out how to properly fix
it
for Linux and why its occuring only on Linux and not Solaris or
Windows?
Thanks in advance