[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird list.begin() error

From: Ralf Fassel
Subject: Re: weird list.begin() error
Date: Fri, 05 Nov 2004 10:16:38 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux)

| class PlayList{
| public:
|     PlayList(){l.push_back("String 1");       l.push_back("String
| 2");l.push_back("String 3");}
|     ~PlayList(){;}
|     list<string>* getList() {return &l;}
| protected:
|       list<string> l;
| };

There is no point in having a `protected' data member if you allow
direct access to it via the getList() function.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]