Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 2
    struct Data { int BoolSize; } Data[0]; declares an array of zero elements. You need to change that 0 to (at least) a 1. Commented Mar 19, 2021 at 9:04
  • For this you should look at template classes. Commented Mar 19, 2021 at 9:14
  • @Mat an array starts from number 0, and I don't want more memory for data so I have given array length 0 only . Can I not be able to access data at array position 0 then ? Commented Mar 19, 2021 at 9:43
  • @Majenko please spend a little more time for me and write an example code here that will be easier for me to understand Commented Mar 19, 2021 at 9:44
  • I will, but I'm cooking breakfast at the moment. Commented Mar 19, 2021 at 9:45