Room* because i dont know how to create objects dynamically without the new operator
Don't create them dynamically, there's no need to.
std::vector already manages memory in a dynamic way. That is, you can insert or remove elements at any time.
There are situations where dynamic memory is required, for example noncopyability (in C++98) or polymorphism. If your compiler supports C++11, you should at least use
std::unique_ptr to get rid of memory management. Raw pointers that own their objects should be avoided where possible.
works perfectly
Even if you do everything correctly (including deallocation), using nested
new[] it is a complicated, error-prone and even inefficient way of storing objects in a 2D container. You need a lot of low-level boilerplate code to make it work, and you're still not safe for many cases (especially exceptions). Please use the RAII idiom and store the objects in a STL container like
std::vector, you can also use only a one-dimensional vector and map 2D indices to 1D. That is more efficient because you only have one allocation/deallocation, a linear memory layout and thus less cache misses at iteration, furthermore there's a smaller memory overhead.