Going thru methods.......array? Enums? What

This is a discussion on Going thru methods.......array? Enums? What within the C++ Programming forums, part of the General Programming Boards category; Ok, so I have a dialog box, with a bunch of edit boxes, all these edit boxes contain information that ...

  1. #1
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427

    Going thru methods.......array? Enums? What

    Ok, so I have a dialog box, with a bunch of edit boxes, all these edit boxes contain information that I am going to store in a class. But I do not want to go box by box and getting the text from them and then calling the class methods one by one.

    I want to put them in a for loop or something, but I don't know if this can be done.

    for example

    Client.[Insert method here with array](parameter here)

    Is this possible, I want to do something like and how is this possible.



    I don't want to have to do........

    Client.SetName(Name);
    Client.SetAddress(Address);

    instead something to the effect of

    Client.[first class name].(buffer);



    /*note the parameter would be changed on a loop by loop basis since it is only a buffer that gets filled with every loop from a different edit box. */
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    Like


    Client.ForEach(somefunction())


    ?


    You need to code a ForEach that takes a function pointer as an argument and operates on members of the class.

  3. #3
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    Thanks, I'll try that........tomorrow I am really tired right now :-D. Thanks
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. from 2D array to 1D array
    By cfdprogrammer in forum C Programming
    Replies: 17
    Last Post: 03-24-2009, 10:33 AM
  2. Replies: 7
    Last Post: 11-25-2008, 12:50 AM
  3. Object array. Probelm accessing methods
    By Bean in forum C++ Programming
    Replies: 4
    Last Post: 05-03-2004, 11:22 AM
  4. Array Program
    By emmx in forum C Programming
    Replies: 3
    Last Post: 08-31-2003, 12:44 AM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM

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