How is memory being allocated to a program in C++ without me manually allocating it?
i know that in a language like C++ in which there is no garbage collector its your job as the programmer to allocate and deallocate memory with new and delete BUT I have never seen that in action practically the little C++ code I have seen as a beginner to the language don't make use of anything related to memory allocation like smart pointers new and delete etc so how is memory allocated to the program like I am completely aware of the concept of static memory allocation but that still doesn't explain things like vector's etc which scale and descale automatically without you explicitly mentioning how much memory to allocate and another thing I wanted to ask was that how will not manually allocating and deallocating memory affect my programs in the sense of not using things like smart pointers or using new and delete.
will I run into memory leaks or something?
any help regarding this question will be extremely appreciated