Click here to Skip to main content
15,867,453 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: STL std::string help needed Pin
Daniel Pfeffer9-Feb-17 6:17
professionalDaniel Pfeffer9-Feb-17 6:17 
GeneralRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 7:27
professionalVISWESWARAN19989-Feb-17 7:27 
GeneralRe: STL std::string help needed Pin
Daniel Pfeffer11-Feb-17 7:36
professionalDaniel Pfeffer11-Feb-17 7:36 
QuestionRe: STL std::string help needed Pin
VISWESWARAN199812-Feb-17 0:18
professionalVISWESWARAN199812-Feb-17 0:18 
AnswerRe: STL std::string help needed Pin
Daniel Pfeffer12-Feb-17 0:47
professionalDaniel Pfeffer12-Feb-17 0:47 
PraiseRe: STL std::string help needed Pin
VISWESWARAN199812-Feb-17 4:25
professionalVISWESWARAN199812-Feb-17 4:25 
PraiseRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 23:54
professionalVISWESWARAN19989-Feb-17 23:54 
QuestionMultiple Inheritance question Pin
samzcs25-Dec-16 17:31
samzcs25-Dec-16 17:31 
C++
class CBase {
    string id;
public:
    void show() {
        cout <<  id << endl;
    }
};

class CDerive1 : public CBase { };
class CDerive2 : public CBase { };
class CSon : public CDerive2, public CDerive1 { };

int main ( )
{
    CSon s;
    cout <<  &s << endl;
    cout <<  "---------" << endl;

    CDerive1 *pd1 = &s;
    cout <<  pd1 << " &S: " << &s <<  endl;
    CDerive2 *pd2 = &s;
    cout <<  pd2 << " &S: " << &s <<  endl;
    cout <<  "---------" << endl;


The output of this code is :
0035FB20
---------
0035FB3C
0035FB20
--------

don't know why cout << pd1, and cout << pd2 are different, they are assigned the same value &s.
GeneralRe: Multiple Inheritance question Pin
Richard MacCutchan25-Dec-16 20:36
mveRichard MacCutchan25-Dec-16 20:36 
GeneralRe: Multiple Inheritance question Pin
samzcs26-Dec-16 7:51
samzcs26-Dec-16 7:51 
GeneralRe: Multiple Inheritance question Pin
Richard MacCutchan26-Dec-16 21:29
mveRichard MacCutchan26-Dec-16 21:29 
AnswerRe: Multiple Inheritance question Pin
Vi228-Dec-16 18:35
Vi228-Dec-16 18:35 
GeneralRe: Multiple Inheritance question Pin
samzcs28-Dec-16 18:40
samzcs28-Dec-16 18:40 
QuestionCalling a MFC dialog from win32 Pin
rdeekonda29-Jul-16 5:46
rdeekonda29-Jul-16 5:46 
AnswerRe: Calling a MFC dialog from win32 Pin
Afzaal Ahmad Zeeshan29-Jul-16 6:01
professionalAfzaal Ahmad Zeeshan29-Jul-16 6:01 
GeneralRe: Calling a MFC dialog from win32 Pin
rdeekonda29-Jul-16 7:04
rdeekonda29-Jul-16 7:04 
AnswerRe: Calling a MFC dialog from win32 Pin
Richard MacCutchan29-Jul-16 6:46
mveRichard MacCutchan29-Jul-16 6:46 
GeneralRe: Calling a MFC dialog from win32 Pin
rdeekonda29-Jul-16 7:08
rdeekonda29-Jul-16 7:08 
GeneralRe: Calling a MFC dialog from win32 Pin
Richard MacCutchan29-Jul-16 22:19
mveRichard MacCutchan29-Jul-16 22:19 
QuestionHow to open file with single quote in its name? Pin
liquid_23-Jul-16 20:09
liquid_23-Jul-16 20:09 
AnswerRe: How to open file with single quote in its name? Pin
Richard MacCutchan23-Jul-16 20:52
mveRichard MacCutchan23-Jul-16 20:52 
GeneralRe: How to open file with single quote in its name? Pin
liquid_23-Jul-16 23:40
liquid_23-Jul-16 23:40 
GeneralRe: How to open file with single quote in its name? Pin
Jochen Arndt24-Jul-16 0:20
professionalJochen Arndt24-Jul-16 0:20 
GeneralRe: How to open file with single quote in its name? Pin
liquid_24-Jul-16 0:21
liquid_24-Jul-16 0:21 
GeneralRe: How to open file with single quote in its name? Pin
Jochen Arndt24-Jul-16 0:34
professionalJochen Arndt24-Jul-16 0:34 

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.