none
Invalid allocation size ??

    Question

  • 

    I  use a Name::Function() to call function within the namespace

    The error msg is:

    Invalid allocation size 42.......bytes

    I searched and it is likely I try to allocate a large memory

    but all i have is 

    Array complete(3);
    for(int i=0; i<3; i++){
    complete[i] = Point(i, 2*i);
    cout << complete[i].ToString()<< endl;
    }

    //using the H class by creating a shorter alias for the namespace
    namespace alias = Name::CAD;
    alias::H test(5,p1);
    cout << test.ToString() << endl;

    Idk my question is specific enough to understand. Sorry. 

    Sunday, September 23, 2012 5:11 PM

Answers

  • It would be good to look at the call stack to see the location in your code that causes this. (Debug -> Windows -> Call Stack). After you have the call stack display you can double click on routines in your own code and check variable values.
    Tuesday, September 25, 2012 4:55 AM
  • Yes your description is enough to understand your problem but unfortunately code is not enought to understand what you are doing like what is the type of Array . Second how are you storing Point inside a array . If you can show your actual code it will be easy to answer your question.

    Thanks


    Rupesh Shukla

    Tuesday, September 25, 2012 9:41 PM

All replies

  • It would be good to look at the call stack to see the location in your code that causes this. (Debug -> Windows -> Call Stack). After you have the call stack display you can double click on routines in your own code and check variable values.
    Tuesday, September 25, 2012 4:55 AM
  • Yes your description is enough to understand your problem but unfortunately code is not enought to understand what you are doing like what is the type of Array . Second how are you storing Point inside a array . If you can show your actual code it will be easy to answer your question.

    Thanks


    Rupesh Shukla

    Tuesday, September 25, 2012 9:41 PM
  • Your code-snippet seems ok. This error can occurr if the heap is corrupt - so the problem may be somewhere else in your code.
    Sunday, January 13, 2013 12:00 PM