Visual C++ .NET Matrix Size Limiation?

This is a discussion on Visual C++ .NET Matrix Size Limiation? within the C++ Programming forums, part of the General Programming Boards category; I need to make a matrix of 450 x 600 of my class object. When I try to make it ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Visual C++ .NET Matrix Size Limitation?

    I need to make a matrix of 450 x 600 of my class object. When I try to make it I get a stackoverflow exception. I tried making a 450 x 600 matrix of ints and it does the same thing. How can I overcome this limitation?
    Last edited by Cornpops; 03-06-2003 at 01:35 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669
    Use the heap and not the stack.
    Code:
    int n; //using the stack
    int *n = new int(); //using the heap
    delete n;
    or
    Code:
    int n[100]; //using the stack
    int *n = new int[100]; //using the heap
    delete[] n;
    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  2. Replies: 11
    Last Post: 03-25-2003, 04:13 PM
  3. <list>
    By Unregistered in forum C++ Programming
    Replies: 9
    Last Post: 02-24-2002, 03:07 PM
  4. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21