   Serialize arrays
  Hi all,i'm writing a serialize system for my engine. If i want to seialize something,i've just to write: Serializer << objToSerialize;if i look at the boost serialize library i see they can serialize an array with the same call (Serializer << array;) i also wants this but how can i get the size of the array? thx in advance   
  If you want the size of the array just use sizeof()   ;Quote:Original post by deathwearerIf you want the size of the array just use sizeof()sizeof does not work that way.As for the OP, maybe you should use vectors or some other sequential data structure class provided by STL.   ;  i know i can use another container but boost does it with an array.   ;  Boost::serialize only does it with an array if it's actually an array rather than a pointer (in which situation the length can be trivially calculated with sizeof). It can't do it with an array which is passed as a pointer, at least not automatically.   