1

I'm trying to create a two dimensional array. But if i try to create it, my program is crashing and i get a stackoverflow error.

I'm creating an Array of a class. The size of one class is 292 byte. My first dimension is 100 big and the other one is 255. So its 100*255*292 = 7446000bytes = ~7,44mb

Is my calcluation wrong?

I hope you can help me...

jeremy d.
  • 11
  • 2
  • What compiler, what OS? You should provide some code. Stack size on Windows is 1MB. You can change it as [described here](https://msdn.microsoft.com/en-us/library/tdkhxaks.aspx). –  Dec 27 '16 at 01:19
  • On Windows, the stack size is one megabyte. You want to create the array dynamically, or better use std::vector. –  Dec 27 '16 at 01:19
  • 7446000bytes = ~7.44mb not 7,44mb – Saurav Sahu Dec 27 '16 at 01:20
  • 2
    @SauravSahu: Lots of countries use a comma as decimal separator: https://en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_decimal_comma – casablanca Dec 27 '16 at 01:23

0 Answers0