Afficher un message
Vieux 17/10/2007, 18h43   #4
BobR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: pasing an array pointer and storing as a class member


Andre Kostur wrote in message...
>
> Keep in mind that std::vector has to do (Well, is very likely to do)
> dynamic memory to store its contents. Arrays do not. You might try
> std::tr1:array instead...


A valid argument. But, sticking 2+ meg in the stack might be a source of his
problem (stack overflow/corruption?).
And if you 'new' the arrays, well, I think std::vector is a good choice.

[ I don't know how C++ sets up the stack, but in assembler, it was precious
realestate. My logic is small things on stack, big things in dynamic(heap).
Feel free to inform/correct me on this point. :-}]
--
Bob R
POVrookie


  Réponse avec citation
 
Page generated in 0,05720 seconds with 9 queries