Search:

Type: Posts; User: tineras

Search: Search took 0.01 seconds.

  1. *bump* I just need to know how to add...

    *bump*

    I just need to know how to add picBlocks[j] as a class member. If you need additional code accurately anser this question, I'd be glad to post it.

    Thanks
  2. I would prefer to make it a class member, but I'm...

    I would prefer to make it a class member, but I'm not sure how to do that. I'm still learning and my teacher doesn't help us out very much.
  3. Undeclared Identifier when trying to access an object

    I created an object array when a button is clicked. When I try to use any of the objects in another function, it is saying that it's an undeclared identifier.

    What do I need to do to make sure I...
  4. Replies
    23
    Views
    5,324

    I do appreciate the help. I have one other...

    I do appreciate the help. I have one other question. When I try to use it in another function, it is saying that it's an undeclared identifier.

    Do I need to reference the function or make it...
  5. Replies
    23
    Views
    5,324

    Amazing!! That works perfectly. Thank you so...

    Amazing!! That works perfectly. Thank you so much. My teacher has been really lazy and doesn't seem to want to help us out. So, I have to figure this stuff out myself. This is all I needed to...
  6. Replies
    23
    Views
    5,324

    I'm using Visual C++ .NET to create a Windows...

    I'm using Visual C++ .NET to create a Windows Forms Application.
  7. Replies
    23
    Views
    5,324

    Are there any good VC++ forums that you can...

    Are there any good VC++ forums that you can recommend. I don't normally frequent programming forums (as you can see by my whopping 12 posts)?
  8. Replies
    23
    Views
    5,324

    The code I originally posted was something my...

    The code I originally posted was something my professor gave to us and later said, "Oh, this doesn't work". So, I don't even have to use that. I can start from scratch with the whole array thing. ...
  9. Replies
    23
    Views
    5,324

    When I put this code in: PictureBox* picBlocks...

    When I put this code in:

    PictureBox* picBlocks = new PictureBox[5];

    for(int i = 0; i < 5; i++)
    pnlGameField->Controls->Add(picBlocks[i]);
    I get a bunch of errors:...
  10. Replies
    23
    Views
    5,324

    I tried this and it does work. However, I am...

    I tried this and it does work. However, I am still unable to use these items in other functions in my code. I really need to be able to reference them individually without having to jump through a...
  11. Replies
    23
    Views
    5,324

    That seems to be running without any problems...

    That seems to be running without any problems also, but I'm not sure what each of these new PictureBoxes are being called. I don't know how reference them in my code...

    like:


    ...
  12. Replies
    23
    Views
    5,324

    for(int i = 0; i < 5; i++) ...

    for(int i = 0; i < 5; i++)
    pnlGameField->Controls->Add(new PictureBox() );


    This seems to work without error, but I just don't know how to access the new PictureBoxes that are created.

    Like...
  13. Replies
    23
    Views
    5,324

    When I add [5] instead of [], I get the error at...

    When I add [5] instead of [], I get the error at this line:


    PictureBox* picBlocks[];

    error C3616: '5': a size cannot be specified in a __gc array declaration

    and

    at this line:
  14. Replies
    23
    Views
    5,324

    Are you saying that this should be my only line...

    Are you saying that this should be my only line of code:



    for(int i = 0; i < 5; i++)
    pnlGameField->Controls->Add(new PictureBox() );


    I need each new PictureBox to be named...
  15. Replies
    23
    Views
    5,324

    Creating object arrays for VC++

    I need to create an array of objects when I click a button in Visual C++. I am having some difficulty doing so. Any help would be appreciated.

    ---Code within button click---



    PictureBox*...
  16. Replies
    9
    Views
    1,222

    Luckily I already had that in my code. If I...

    Luckily I already had that in my code. If I didn't, I would've been stumped. Thanks again!
  17. Replies
    9
    Views
    1,222

    Thanks a million. Worked like a charm!

    Thanks a million. Worked like a charm!
  18. Replies
    9
    Views
    1,222

    My C++ Homework...Simple Question

    I need to draw 8 random numbers (from 1 to 4). The numbers can only repeat once. I need there to be two 1s, two 2s, two 3s, and two 4s in random order. I need them put into an array.

    Example...
Results 1 to 18 of 18