Linux in General > Linux Development & Programming
Programming in C++ : STL problems in Linux
(1/1)
a_mlt1:
Hi Guys,
I am a new member of this forum.
I am facing some problems while porting my code from VC++ (ver 6) to Kdevelop on Linux.
for the sake of understanding it better here is the dummy of the problem :
--- Code: ---
#include <iostream>
#include <vector>
using namespace std;
template <typename CName>
class a
{
};
template <typename CName>
class b
{
vector<a<CName>* > :: iterator c;
};
int main()
{
return 0;
}
--- End code ---
After compilation the above code returns some warnings.
--- Quote ---
The above code after compilation returns following warnings:
warning : 'typename std:vector<a<CName>*,std::allocator<a<CName>*> >::iterator is implicitly a typename
warning : implicit typename is deprecated, please see the documentation for details
--- End quote ---
I want to remove these warnings as these are giving errors in my code during compilation.
Can any one help me out in this !
Cheers !
a_mlt1
a_mlt1:
Hi Guys,
I got its solution.
I was missing the keyword 'typename'
--- Quote ---
typename vector<a<CName>* > :: iterator c;
--- End quote ---
Thanks to guys who gave me solution or invested efforts !
Regards
a_mlt1
Navigation
[0] Message Index
Go to full version