Bad allocation exceptions in C++?

In a school project of mine I was requested to create a program not using STL. In the program I use alot of Poin...

Double pointer array in c++?

I was reading a program about BTree, there I came across this : BTreeNode **C. I understand that it is a 2d array bu...

Should I check if malloc() was successful??

Should one check after each malloc() if it was successful? Is it at all possible that a malloc() fails? What happens...

Why is the use of alloca() not considered good practice??

alloca() allocates memory on the stack rather than on the heap, as in the case of malloc(). So, when I return from t...

Static array vs. dynamic array in C++?

What is the difference between a static array and a dynamic array in C++? I have to do an assignment for my class a...

How to allocate a 2D array of pointers in C++?

I'm trying to make a pointer point to a 2D array of pointers. What is the syntax and how would I access elements? ...