S
sandeep Kanwal
Hello,
Just started using some STL stuff and I am getting some compiler error
as below Please guide...
Error : illegal operands 'GraphicDataLinkInfo' == 'const
GraphicDataLinkInfo'
(point of instantiation: 'main()')
(instantiating: 'std::replace<std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>,
GraphicDataLinkInfo>(std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>,
std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>, const
GraphicDataLinkInfo &, const GraphicDataLinkInfo &)')
algorithm line 1270 if (*first == old_value)
#include <vector>
#include <algorithm>
#include <iostream>
class GraphicDataLinkInfo {
public:
GraphicDataLinkInfo() {}
};
int main()
{
using namespace std;
vector<GraphicDataLinkInfo> test;
GraphicDataLinkInfo test1;
std::replace(test.begin(), test.end(), test1, test1);
cout << "Hello World, this is CodeWarrior!" << endl;
return 0;
}
Thanks
ks
Just started using some STL stuff and I am getting some compiler error
as below Please guide...
Error : illegal operands 'GraphicDataLinkInfo' == 'const
GraphicDataLinkInfo'
(point of instantiation: 'main()')
(instantiating: 'std::replace<std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>,
GraphicDataLinkInfo>(std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>,
std::__wrap_iterator<std::vector<GraphicDataLinkInfo,
std::allocator<GraphicDataLinkInfo>>, GraphicDataLinkInfo *>, const
GraphicDataLinkInfo &, const GraphicDataLinkInfo &)')
algorithm line 1270 if (*first == old_value)
#include <vector>
#include <algorithm>
#include <iostream>
class GraphicDataLinkInfo {
public:
GraphicDataLinkInfo() {}
};
int main()
{
using namespace std;
vector<GraphicDataLinkInfo> test;
GraphicDataLinkInfo test1;
std::replace(test.begin(), test.end(), test1, test1);
cout << "Hello World, this is CodeWarrior!" << endl;
return 0;
}
Thanks
ks