Pointer to Pointername..???

This is a discussion on Pointer to Pointername..??? within the C++ Programming forums, part of the General Programming Boards category; How can I make a pointer til the Memoname. I have made 6 Memoboxes in C+Builder. And I need to ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    64

    Pointer to Pointername..???

    How can I make a pointer til the Memoname.
    I have made 6 Memoboxes in C+Builder.

    And I need to call the 6 names from the same function.
    ex:
    int x;
    char buf[80] = "b1";
    char tal[4];

    for(x=1700; x<2100; x+=100)
    {
    sprintf(buf,"b1");
    sprintf(tal,"%d",x);
    strcat(buf,tal);
    buf->Lines->Clear();
    //Makes error here, the compiler can't figured it out.....................
    }
    // It nedd to post: b11700 - b11800 e.t.c

    I need to call the by name, som they can be cleared.
    Can't it be done, I really hope so.

    Hope someone can help me,...tx

    Gugge
    !G!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,590
    forget about tal and just do

    sprintf( buff, "b1%d", x );

    > buf->Lines->Clear();
    Erm, buff is a char array, this makes no sense

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    64
    Tx I have been over that thought too, but what can be done then..
    !G!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quick Pointer Question
    By gwarf420 in forum C Programming
    Replies: 15
    Last Post: 06-01-2008, 03:47 PM
  2. Replies: 1
    Last Post: 03-24-2008, 10:16 AM
  3. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  4. How did you master pointers?
    By Afrinux in forum C Programming
    Replies: 15
    Last Post: 01-17-2006, 07:23 PM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21