Thread: Visual C++ .NET Matrix Size Limiation?

  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 02:35 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    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, 05:45 PM
  2. Replies: 11
    Last Post: 03-25-2003, 05:13 PM
  3. <list>
    By Unregistered in forum C++ Programming
    Replies: 9
    Last Post: 02-24-2002, 04: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