Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSecondary Desktop Pin
trioum19-Feb-10 21:11
trioum19-Feb-10 21:11 
AnswerRe: Secondary Desktop Pin
Richard MacCutchan20-Feb-10 0:38
mveRichard MacCutchan20-Feb-10 0:38 
GeneralRe: Secondary Desktop Pin
Maximilien20-Feb-10 1:53
Maximilien20-Feb-10 1:53 
GeneralRe: Secondary Desktop Pin
trioum20-Feb-10 21:44
trioum20-Feb-10 21:44 
AnswerRe: Secondary Desktop Pin
WoutL20-Feb-10 2:32
WoutL20-Feb-10 2:32 
QuestionRepeat a typedef or include a header with the typedef? Pin
asincero19-Feb-10 13:22
asincero19-Feb-10 13:22 
AnswerRe: Repeat a typedef or include a header with the typedef? Pin
«_Superman_»19-Feb-10 15:35
professional«_Superman_»19-Feb-10 15:35 
AnswerRe: Repeat a typedef or include a header with the typedef? Pin
cmk20-Feb-10 12:21
cmk20-Feb-10 12:21 
#1 - clumsy, forcing an unneeded dependency for Foos on ClassA.
#2 - bad, semantically if not syntactically.

asincero wrote:
Perhaps I should I break out the Foos typedef into it's own header (perhaps
the header file for class Foo?) and have both class_a.h and class_b.h
include that?

Yes.

Foo.h:
class  Foo;
typedef std::vector< boost::shared_ptr<Foo> > VectorSharedPtrFoo;

class Foo { ... };

or,
class Foo {
  typedef std::vector< boost::shared_ptr<Foo> > VectorSharedPtr;
};

I usually prefer the former.

In general, do not define a type in a class unless it is specific to that class.

... and do you _really_ want to return a vector from ClassA::makeFoos() ?
The newer compilers can try to optimize out the copy, but you're never sure.
Usually better to pass a non-const ref as an output parameter.
...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

QuestionKeyBoard Hook Pin
devidmorton19-Feb-10 9:22
devidmorton19-Feb-10 9:22 
AnswerRe: KeyBoard Hook [modified] Pin
Abhi Lahare19-Feb-10 10:05
Abhi Lahare19-Feb-10 10:05 
GeneralRe: KeyBoard Hook [modified] Pin
devidmorton20-Feb-10 8:31
devidmorton20-Feb-10 8:31 
GeneralRe: KeyBoard Hook Pin
Abhi Lahare22-Feb-10 5:13
Abhi Lahare22-Feb-10 5:13 
QuestionFast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Kiran Satish19-Feb-10 9:05
Kiran Satish19-Feb-10 9:05 
AnswerRe: Fast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Chris Losinger19-Feb-10 12:09
professionalChris Losinger19-Feb-10 12:09 
AnswerRe: Fast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Jonathan Davies20-Feb-10 1:17
Jonathan Davies20-Feb-10 1:17 
GeneralRe: Fast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Stephen Hewitt20-Feb-10 3:33
Stephen Hewitt20-Feb-10 3:33 
GeneralRe: Fast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Kiran Satish20-Feb-10 11:05
Kiran Satish20-Feb-10 11:05 
GeneralRe: Fast and efficeint way to rotate a bitmap at integer multiples of 90°?? Pin
Jonathan Davies20-Feb-10 11:30
Jonathan Davies20-Feb-10 11:30 
QuestionList of installed applications (as shown by "Open With" dialog box of windows.) Pin
Aseem Sharma19-Feb-10 1:10
Aseem Sharma19-Feb-10 1:10 
AnswerRe: List of installed applications (as shown by "Open With" dialog box of windows.) Pin
KingsGambit19-Feb-10 2:10
KingsGambit19-Feb-10 2:10 
AnswerRe: List of installed applications (as shown by "Open With" dialog box of windows.) Pin
fat_boy19-Feb-10 2:40
fat_boy19-Feb-10 2:40 
AnswerRe: List of installed applications (as shown by "Open With" dialog box of windows.) Pin
David Crow19-Feb-10 4:00
David Crow19-Feb-10 4:00 
QuestionConfusion Pin
john563218-Feb-10 23:41
john563218-Feb-10 23:41 
AnswerRe: Confusion Pin
Rajesh R Subramanian18-Feb-10 23:45
professionalRajesh R Subramanian18-Feb-10 23:45 
GeneralRe: Confusion Pin
john563218-Feb-10 23:56
john563218-Feb-10 23:56 

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.