Solved

An Array of CStringList

Posted on 2004-08-12
4
375 Views
Last Modified: 2013-11-20
I am creating an object that needs a data member to hold an array of CStringList. How can I do this?
0
Comment
Question by:SGyves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
millsoft earned 500 total points
ID: 11788732
class Foo
{
    vector< CStringList > m_stringListArray
};

or

class Foo
{
    CArray< CStringList > m_stringListArray;
};

0
 

Author Comment

by:SGyves
ID: 11788983
Actually....you cant do the second one...getting errors
0
 

Author Comment

by:SGyves
ID: 11789032
The second one cannot be done because there is no overloaded '=' operator for the CStringList
0
 

Author Comment

by:SGyves
ID: 11789059
This would work though...(found through trial and error)

CTypedPtrList<CObList, CStringList*> m_strlistMyList

just have to dynamically allocate for each new stringlist...but it works!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 56
post4 challenge 28 122
changeXy challenge 13 98
Capture logon name 13 119
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question