suppose I need a quick and dirty array for a calculation. Will it be better to use new/delete as opposed to just allocating them on stack? For example:
as opposed to:Code:int dostuff(){ char * x = new char[2048]; // do stuff delete x; }
I have a feeling the second one isn't very common.. thanks in advance.Code:int dostuff(){ char x[2048]; // do stuff with x }