Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to build bitmaps from the scratch? Pin
User-37793610-Aug-04 23:57
User-37793610-Aug-04 23:57 
AnswerRe: How to build bitmaps from the scratch? Pin
V.11-Aug-04 0:23
professionalV.11-Aug-04 0:23 
AnswerRe: How to build bitmaps from the scratch? Pin
Antony M Kancidrowski11-Aug-04 3:01
Antony M Kancidrowski11-Aug-04 3:01 
GeneralRe: How to build bitmaps from the scratch? Pin
Anonymous11-Aug-04 7:47
Anonymous11-Aug-04 7:47 
GeneralSDI Different Views Pin
Rassul Yunussov10-Aug-04 22:51
Rassul Yunussov10-Aug-04 22:51 
GeneralRe: SDI Different Views Pin
Michael P Butler10-Aug-04 23:37
Michael P Butler10-Aug-04 23:37 
GeneralRe: SDI Different Views Pin
Joel Holdsworth10-Aug-04 23:43
Joel Holdsworth10-Aug-04 23:43 
GeneralLists of a class : where to put a typedef Pin
Jerome Conus10-Aug-04 22:50
Jerome Conus10-Aug-04 22:50 
Hi !

Here is a coding design question.

I defined a class in my application, let's call it CPoint.

In many other classes of my application, I have to manipulate lists of pointeurs on CPoint objects. I need to pass such lists by parameters.

For now, I defined, in each class using a list of CPoint a typedef like this :

typedef vector<CPoint*> PointList_t;

I'm now wondering if, instead of declaring such typedef in each class using a list of CPoint*, if it would be better coding practice to define such typedef in the CPoint class itselt :

class CPoint
{
public:
typedef vector<CPoint*> PointList_t;

...
};

and, in classes using a list of CPoint*, I would do (for example) :

void Foo(CPoint::PointList_t MyPointList)
{
CPoint::PointList_t::iterator It = MyPointList.begin();
...
...
}

The advantage of this new way of doing would be to avoid multiple declaration of the same typedef, the drawback is that I have to put CPoint:: each time I need a PointList_t and that I have to include the CPoint.h in the header of the classes using such typedef where a simple declaration of the class was enough with my first way of doing things.

What is your suggestion ?
Thanks !
Jerome
GeneralRe: Lists of a class : where to put a typedef Pin
Antony M Kancidrowski11-Aug-04 0:04
Antony M Kancidrowski11-Aug-04 0:04 
GeneralBits Fields - How to Use them Pin
sweep12310-Aug-04 22:24
sweep12310-Aug-04 22:24 
GeneralRe: Bits Fields - How to Use them Pin
Antony M Kancidrowski10-Aug-04 23:45
Antony M Kancidrowski10-Aug-04 23:45 
GeneralRe: Bits Fields - How to Use them Pin
sweep12311-Aug-04 1:24
sweep12311-Aug-04 1:24 
GeneralRe: Bits Fields - How to Use them Pin
Antony M Kancidrowski11-Aug-04 2:03
Antony M Kancidrowski11-Aug-04 2:03 
GeneralRe: Bits Fields - How to Use them Pin
David Crow11-Aug-04 5:25
David Crow11-Aug-04 5:25 
GeneralRe: Bits Fields - How to Use them Pin
sweep12311-Aug-04 6:12
sweep12311-Aug-04 6:12 
GeneralRe: Bits Fields - How to Use them Pin
David Crow11-Aug-04 7:23
David Crow11-Aug-04 7:23 
GeneralRe: Bits Fields - How to Use them Pin
sweep12311-Aug-04 21:58
sweep12311-Aug-04 21:58 
GeneralRe: Bits Fields - How to Use them Pin
David Crow12-Aug-04 2:58
David Crow12-Aug-04 2:58 
GeneralRe: Bits Fields - How to Use them Pin
sweep12312-Aug-04 4:17
sweep12312-Aug-04 4:17 
GeneralDialog Keyboard Events Pin
Joel Holdsworth10-Aug-04 22:14
Joel Holdsworth10-Aug-04 22:14 
GeneralRe: Dialog Keyboard Events Pin
Johan Rosengren11-Aug-04 6:44
Johan Rosengren11-Aug-04 6:44 
GeneralVisual C++ .net and Word 2003 automation Pin
tiziacaia10-Aug-04 21:57
tiziacaia10-Aug-04 21:57 
GeneralRe: Visual C++ .net and Word 2003 automation Pin
Steve Thresher11-Aug-04 3:04
Steve Thresher11-Aug-04 3:04 
GeneralRe: Visual C++ .net and Word 2003 automation Pin
tiziacaia11-Aug-04 4:12
tiziacaia11-Aug-04 4:12 
GeneralRe: Visual C++ .net and Word 2003 automation Pin
Steve Thresher11-Aug-04 9:32
Steve Thresher11-Aug-04 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.