C++ array assign error: invalid array assignment

后端 未结 4 1140
无人及你
无人及你 2020-12-15 05:43

I\'m not a C++ programmer, so I need some help with arrays. I need to assign an array of chars to some structure, e.g.

struct myStructure {
  char message[40         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-15 06:04

    The declaration char hello[4096]; assigns stack space for 4096 chars, indexed from 0 to 4095. Hence, hello[4096] is invalid.

提交回复
热议问题