c++ - Push_back on a vector of array of char -
I have a problem with push_back, it does not work with my code: (
Code> Constant DIM = 10, Vector and LT; four [DIM]> Series; Int Function Unit (DIM) [categorie.push_back (cat); return 0;}How to do
Thank you!
PS: I'm using Eclipse CDT
This will not work. To copy
std :: vector toT Is required to be qualified or running. There is an indicator forfunction_1 ,catchar inside, notchar An array of.If you have C +11, then use
std :: array :const int DIM = 10 ; Vector & lt; array & lt; char, dIM & gt; categorie; int function_1 (array & lt; char, dIM & gt; cat) {categorie.push_back (cat); return 0;}If you do not have this, then you use it in a class in the array and instead. Of course, you can do that for yourself.
Comments
Post a Comment