This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

init of large arrays

Hi all,

what would be the best way to init a huge array, which will never change his values? Will the array affect the stack if I use const aray[][] or should I use static const array[][]?

What would be the best way if the array is not const during the whole program?

best regards
Hans

Parents
  • Static for a function is just a question of name-space pollution.

    Try to strive for encapsulation, not letting all of the program know about the internals of your modules. That will stop you from getting tempted to use these functions where they shouldn't. Encapsulation will make it easier to rewrite a module to use another algorithm without breaking the rest of the program.

Reply
  • Static for a function is just a question of name-space pollution.

    Try to strive for encapsulation, not letting all of the program know about the internals of your modules. That will stop you from getting tempted to use these functions where they shouldn't. Encapsulation will make it easier to rewrite a module to use another algorithm without breaking the rest of the program.

Children
No data