CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: mcclane400

Search: Search took 0.02 seconds.

  1. Replies
    6
    Views
    8,546

    Re: Static array allocation problem

    Works for me, thanks for the help.
  2. Replies
    6
    Views
    8,546

    Re: Static array allocation problem

    The address of that block is myarray, not myarray[0]. myarray[0] would be 5, yes? The address of that block of memory is myarray so what exactly is &myarray... is it also the address of that block...
  3. Replies
    6
    Views
    8,546

    Re: Static array allocation problem

    I like the answer but where is "c" stored (is it even stored anywhere)? I mean, it has to be stored in memory somewhere, right? This kind of goes back to my example of "a" where cout << a; prints...
  4. Replies
    6
    Views
    8,546

    Static array allocation problem

    Consider the following code:

    int a = 5;
    cout << a << " " << &a;

    Obviously "a" prints out 5 and &a prints out the address of a. Now this code:

    int * b = new int[2];
    cout << b << " " << &b;
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured