C style arrays question
This is how to make a C style array of pointers right? Wondering cause I want to make an array that can be resized. Although I don't want to use STL. don't ask I'm weird.
Question is. Am I doing this right to avoid memory leaks? Wanting to know before I put it in a class, and stuff.
int** T = new int*;
T = new int(100);
std::cout << *T << std::endl;
delete  T;
>> Am I doing this right to avoid memory leaks?
Yes. So far. You'll have more work to do when you put in your class or when you try to actually resize it.
>> don't ask I'm weird
I won't ask, I'll just comment. It makes no sense to me.
Actually the main reason is because I want to try it myself. Not that I don't like the STL. Just seeing if I can do it myself. Self gratification basically.
Doesn't seem that weird then :)