parse error before `>' token

N

nitin

HI
I am getting the following error while trying to compile my program

/usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token

namespace std
47 {
48 template<typename _Alloc>
49 class allocator;
50
51 template<class _CharT>
52 struct char_traits;
53
54 template<typename _CharT, typename _Traits = char_traits<_CharT>,
55 typename _Alloc = allocator<_CharT> >
56 class basic_string;


Can sumone tell me the possible solution to it

Thanks
 
M

Michael Dean

nitin said:
HI
I am getting the following error while trying to compile my program

/usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token

namespace std
47 {
48 template<typename _Alloc>
49 class allocator;
50
51 template<class _CharT>
52 struct char_traits;
53
54 template<typename _CharT, typename _Traits =
char_traits<_CharT>,
55 typename _Alloc = allocator<_CharT> >
56 class basic_string;


Can sumone tell me the possible solution to it

Thanks

That's not enough information to tell. The file is fine (I double checked
against my own local one to be sure; I'm guessing you're on RedHat 9 like I
am?)
It probably has to do with your compiler configuration and/or something
included before it, or how it was included. You need to provide that
information for help with this.
 
D

David Cattarin

HI
I am getting the following error while trying to compile my program

/usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token

namespace std
47 {
48 template<typename _Alloc>
49 class allocator;
50
51 template<class _CharT>
52 struct char_traits;
53
54 template<typename _CharT, typename _Traits = char_traits<_CharT>,
55 typename _Alloc = allocator<_CharT> >
56 class basic_string;


Can sumone tell me the possible solution to it

Did you include <memory>?
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top