When is memory allotted to static variables in C++

前端 未结 3 766
别跟我提以往
别跟我提以往 2020-12-23 15:42

I am a newbie to C++ and facing a problem.

I read in a book that memory is allotted to a static variable, once the object is created of that class. Now, what if I ma

3条回答
  •  再見小時候
    2020-12-23 16:19

    On programstart (before main) memory will be allocated for your static global variable.

    I have no idea for the 2nd question.

提交回复
热议问题