nested classes
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: nested classes

Threaded View

  1. #1
    Join Date
    Mar 2009

    nested classes

    I have a program I need to change. There is a class which is used as the member of a list. The list is a member of another class. I need to access the list from outside of both classes.

    class c_message_bit
    		string s_message_bit;
    		string s_type;  
    		int i_bit_number; // simple count
    		string s_separator; // Any one from vector of separator
    class c_message_element
             	list <c_message_bit> l_A_message_bit;
    I tried something along the lines of

        list <c_message_bit> ::iterator ilocatorlist1;
       for ( ilocatorlist1 = D1_message_element.l_D_message_bit.begin(); \
       ilocatorlist1 != D1_message_element.l_D_message_bit.end(); \
       	++ ilocatorlist1 )
    but without success. It compiled but never entered the for loop.

    I need to compare several of the lists stored within various instances of the main class.

    Is there a way I can loop through the values of the list external to the classes?
    And if not is there a simple way to copy the list to one declared on the outside?

    The program is bit large and this requirement temporary so redesign is not an attractive route.

    Thanks for any help. Nigel
    Last edited by nigelhoath; August 7th, 2009 at 03:46 PM.

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center