+ 1
What is the word 'new' means in c++
What it is mean in this code ? queue = new int[100];
2 Respuestas
+ 2
'new' sends the memory allocated to the queue to the heap instead of in the stack. Read the comments in the lesson, they help out.
+ 1
`new` operator is what we use to allocate memory dynamically. `delete` is what we use to deallocate memory.
https://en.cppreference.com/w/cpp/language/new
https://en.cppreference.com/w/cpp/language/delete