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 to T Is required to be qualified or running. There is an indicator for function_1 , cat char inside, not char 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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -