c++ - Contents of an untyped object copied into vector -


I am trying to write content of an intermediate object which keeps the images of an image in a vector filled with unsigned characters . Sadly, I can not get it to work, maybe someone can tell me in the right direction?

What's my time here:

  vector & lt; Unsigned four & gt; SQLiteDB :: BlobData (int clmNum) {// I get data of image configuration zero * data = sqlite3_column_blob (pSQLiteConn-> pRes, clmNum); Vector & lt; Unsigned four & gt; Bytes; // Image size changes in bytes int size = matching (clone); Unsigned four b [size]; memcpy (b, data, size); For (int j = 0; j and lt; size, j ++) {bytes. Push_back (b [j]) m) return bytes; }   

If I try to find the contents of the bytes vector then all this is empty.

The question is, how can I get data in vector?

You should use the vector constructor, which takes some of the rockers: < Pre> constant unsigned char * data = static_cast & lt; Kong unsigned letter * & gt; (Sqlite3_column_blob (pSQLiteConn-> pRes, clmNum)); Vector & lt; Unsigned four & gt; Bytes (data, data + matchingbites (clones));

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -