Hi!I am writing a c++ program which uses a vector which contains rows and columns of a table.Unfortunately I got the following error:
IntelliSense: no instance of overloaded function "std::vector<_Ty, _Alloc>::push_back [with _Ty=CCellDescr *, _Alloc=std::allocator<CCellDescr *>]" matches the argument list
argument types are: (const CCellDescr)
object type is: std::vector<CCellDescr *, std::allocator<CCellDescr *>> Here`s the code:
#include<iostream>
#include<fstream>
#include<vector>
#include<string>
#include<iterator>
using namespace std;
class CCellDescr
{
public:
double m_double_val;
string m_str_val;
int m_row;
int m_col;
char m_cCellType; // 'N' 'S'
static int iSortColumnNum;
You're trying to push an object (not a pointer) onto a vector of pointers.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/