Dynamically allocate memory for struct

前端 未结 8 672
自闭症患者
自闭症患者 2020-12-31 12:21

I am taking a C++ class and have a assignment which requires me to dynamically allocate memory for a struct. I don\'t recall ever going over this in class and we only brief

8条回答
  •  余生分开走
    2020-12-31 12:39

    if you want to understand the concept of syntax or wanna feel of the syntax .. just always treat this struct student = new student syntax. as struct student = new sizeof(student); means you are just simply putting the datatype in the sizeof()-fn for-size-confirmation.

提交回复
热议问题