Does anyone know how to resize an array in C++? the function is inside a .h file. Here is the function template:
Resize(int x); //Resizes the array to the new int size
Any help is greatly appreciated.
C++ array programming?
A .h is a header file. So if your program is able to compile with that in the include statement, that means it's somewhere on your computer. In short, a resizing of an array (since arrays are of FIXED sizes) would mean creating a temporary array, putting all the information of the original array into the temp array, deleting the original array and creating a NEW array of the same type and name of the original array and only making it a different size. Msg me with more details and I'll help you out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment