delete && new || realloc( ) ??
What is the best/fastest? First deleting and then allocating with new, or just reallocating the space with realloc()?
Oh, and btw, can I use realloc with new/delete? Or is there another operator?
I''m sorry to trouble you all, but I should really just google for it before I ask... Well, this time I googled for the answer right after I asked the question here, and found the answer right away!
I''ll try loking a little next time
...
I''ll try loking a little next time

Ok, I should probably google as well but I''m just curious, does realloc work with new/delete?
"If all else fails, lower your standards."
Oh, and btw, can I use realloc with new/delete?
Not in the way you are thinking. STL containers are usually the answer.
Or is there another operator?
Placement new. Deep magic.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
Not in the way you are thinking. STL containers are usually the answer.
Or is there another operator?
Placement new. Deep magic.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement