samedi 16 février 2019

error in passing 2d vector of chars in to a function

I want to pass a variable which is of type vector<vector<char>> p into another function declared as void foo(vector<vector<char>> &var). To pass p into foo I simply did foo(p). While doing so I get the following error

error: no match for call to ‘(std::vector<std::vector<char> >) (std::vector<std::vector<char> >&)’

I have followed the discussion given in here!

Aucun commentaire:

Enregistrer un commentaire