CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    140

    Question how to make an int array? *basic question

    hi, i want to use things like:

    int in;

    in[1] = 1;
    in[2] = 1;
    in[4] = 6;
    in [i] = i;

    so later i can check things like:

    if(in[i] == 1){
    do things();
    }
    else if(in[i] == 2){
    do things2();
    }

    what type of thingy do i need to create for this?
    i tried char in[200]; but it allways said in[i] == 1 for any value O_o
    Last edited by Owyn; May 14th, 2009 at 05:44 AM.

Tags for this Thread

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