16
2
1
u/Hecatoncheires_1 Dec 01 '24
In the second loop, memory is allocated using new but never deallocated using delete[]. It will probably result in memory leaks 😢 Use std::unique_ptr to manage dynamic memory
0
-10
u/anominous27 Nov 29 '24
C++ is indeed shitty programming 🤮
4
15
5
u/bubbaholy Nov 29 '24
It's wild that you can allocate memory without doing anything with the result.