Click here to Skip to main content
15,498,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: #define won't work in QStringList , gives no error Pin
Mircea Neacsu11-Aug-22 12:57
mvaMircea Neacsu11-Aug-22 12:57 
GeneralRe: #define won't work in QStringList , gives no error Pin
Member 1496877111-Aug-22 17:43
MemberMember 1496877111-Aug-22 17:43 
GeneralRe: #define won't work in QStringList , gives no error Pin
David Crow11-Aug-22 17:03
MemberDavid Crow11-Aug-22 17:03 
Questionmanaging objects derived from the same base class using a container Pin
Calin Negru10-Aug-22 4:29
MemberCalin Negru10-Aug-22 4:29 
AnswerRe: managing objects derived from the same base class using a container Pin
Mircea Neacsu10-Aug-22 4:55
mvaMircea Neacsu10-Aug-22 4:55 
AnswerRe: managing objects derived from the same base class using a container Pin
Greg Utas10-Aug-22 4:56
mveGreg Utas10-Aug-22 4:56 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru10-Aug-22 7:34
MemberCalin Negru10-Aug-22 7:34 
AnswerRe: managing objects derived from the same base class using a container Pin
Richard MacCutchan10-Aug-22 5:01
mveRichard MacCutchan10-Aug-22 5:01 
Yes, except for:
1. Why are you using an array size reference in your instantiations? All you should need is:
C++
derivedclass * Derived1 = new derivedclass();


2. Your container is defined to use somebaseclass * types, so your calls to push_back should be:
C++
AllObject->push_back((somebaseclass*)Derived1);

or better still, using proper C++ casts:
C++
AllObject->push_back(reinterpret_cast<somebaseclass*>(Derived1));

GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru10-Aug-22 7:33
MemberCalin Negru10-Aug-22 7:33 
GeneralRe: managing objects derived from the same base class using a container Pin
Richard MacCutchan10-Aug-22 7:40
mveRichard MacCutchan10-Aug-22 7:40 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru10-Aug-22 12:14
MemberCalin Negru10-Aug-22 12:14 
GeneralRe: managing objects derived from the same base class using a container Pin
k505410-Aug-22 14:01
mvek505410-Aug-22 14:01 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru10-Aug-22 22:25
MemberCalin Negru10-Aug-22 22:25 
GeneralRe: managing objects derived from the same base class using a container Pin
Richard MacCutchan10-Aug-22 22:10
mveRichard MacCutchan10-Aug-22 22:10 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru11-Aug-22 1:38
MemberCalin Negru11-Aug-22 1:38 
GeneralRe: managing objects derived from the same base class using a container Pin
Richard MacCutchan11-Aug-22 1:39
mveRichard MacCutchan11-Aug-22 1:39 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru11-Aug-22 1:57
MemberCalin Negru11-Aug-22 1:57 
GeneralRe: managing objects derived from the same base class using a container Pin
Calin Negru12-Aug-22 19:58
MemberCalin Negru12-Aug-22 19:58 
GeneralRe: managing objects derived from the same base class using a container Pin
Richard MacCutchan12-Aug-22 22:55
mveRichard MacCutchan12-Aug-22 22:55 
Questionmoving graphics in a win32 c++ window Pin
Calin Negru9-Aug-22 9:25
MemberCalin Negru9-Aug-22 9:25 
AnswerRe: moving graphics in a win32 c++ window Pin
Gerry Schmitz9-Aug-22 10:15
mveGerry Schmitz9-Aug-22 10:15 
AnswerRe: moving graphics in a win32 c++ window Pin
Graham Breach9-Aug-22 21:54
MemberGraham Breach9-Aug-22 21:54 
AnswerRe: moving graphics in a win32 c++ window Pin
Richard MacCutchan9-Aug-22 21:57
mveRichard MacCutchan9-Aug-22 21:57 
GeneralRe: moving graphics in a win32 c++ window Pin
Calin Negru10-Aug-22 2:58
MemberCalin Negru10-Aug-22 2:58 
GeneralRe: moving graphics in a win32 c++ window Pin
Richard MacCutchan10-Aug-22 3:01
mveRichard MacCutchan10-Aug-22 3:01 

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.