Hey there,
I am using Eclipse CDT on Linux (Ubuntu) and encountering a strange error.
This is my C++ header file:
The implementation of the ctor and dtor is done at the cpp file and irrelevant in this post.Code:class A { public: A(int x, int y, bool direction); virtual ~A(); private: pair <int, int> m_pair_int; bool m_direction; };
When compiling this code, I get the following error messages:
expected `;` before `<` token
ISO C++ forbids declaration of `pair` with no type
all these errors are pointing to the line where `pair <int, int> m_pair_int;` is.
Thanks in advance![]()



1Likes
LinkBack URL
About LinkBacks



