CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    29

    array not working.

    I am trying to use arrays, but it wont compile. I am a little rusty, but this is how I think I remember them being used.

    declaration:
    Code:
    int test[4];
    Error:
    Code:
    error C2040: 'test' : 'int [4]' differs in levels of indirection from 'int'

  2. #2
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    Re: array not working.

    You need to post more of your code.
    That declaration looks fine.
    «_Superman
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

  3. #3
    Join Date
    Nov 2009
    Posts
    29

    Re: array not working.

    Ok this is weird, I just uncommented it and recompiled my program and it is now perfectly fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured