Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert Convert C# code to C++ 2005 with extended stored procedure [modified] Pin
sea200616-Aug-06 7:02
sea200616-Aug-06 7:02 
Questionmultiple selection list box Pin
kumar_mk16-Aug-06 6:51
kumar_mk16-Aug-06 6:51 
AnswerRe: multiple selection list box Pin
Chris Losinger16-Aug-06 7:01
professionalChris Losinger16-Aug-06 7:01 
GeneralRe: multiple selection list box Pin
kumar_mk16-Aug-06 7:24
kumar_mk16-Aug-06 7:24 
AnswerRe: multiple selection list box Pin
David Crow16-Aug-06 7:25
David Crow16-Aug-06 7:25 
QuestionOperator Overloading Pin
RichardS16-Aug-06 6:17
RichardS16-Aug-06 6:17 
AnswerRe: Operator Overloading Pin
valikac16-Aug-06 8:03
valikac16-Aug-06 8:03 
AnswerRe: Operator Overloading Pin
Zac Howland16-Aug-06 10:34
Zac Howland16-Aug-06 10:34 
RichardS wrote:
Is this possible, and if so how?


Yes.

class X
{
public:
        int getInt() { return 0; }
};

class Y
{
public:
        X* operator->() { return &_x; }
private:
        X _x;
};

int main()
{
        Y y;
        return y->getInt();
}


The restriction on overloading -> is that it must return a pointer of some kind.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: Operator Overloading Pin
RichardS16-Aug-06 21:00
RichardS16-Aug-06 21:00 
QuestionPaint/Invalidate problem ( HTML browser ) maybe WS_CLIPCHILDREN related ? Pin
Maximilien16-Aug-06 6:01
Maximilien16-Aug-06 6:01 
QuestionTCP socket time out Pin
nahitan16-Aug-06 5:36
nahitan16-Aug-06 5:36 
AnswerRe: TCP socket time out [modified] Pin
S Douglas22-Aug-06 21:11
professionalS Douglas22-Aug-06 21:11 
QuestionSyntax problems Pin
Jay0316-Aug-06 5:19
Jay0316-Aug-06 5:19 
AnswerRe: Syntax problems Pin
Rage16-Aug-06 5:23
professionalRage16-Aug-06 5:23 
GeneralRe: Syntax problems Pin
Jay0316-Aug-06 5:51
Jay0316-Aug-06 5:51 
GeneralRe: Syntax problems Pin
led mike16-Aug-06 5:59
led mike16-Aug-06 5:59 
GeneralRe: Syntax problems Pin
Hamid_RT17-Aug-06 6:20
Hamid_RT17-Aug-06 6:20 
QuestionIssues with HtmlHelp Pin
Shaffiq16-Aug-06 4:19
Shaffiq16-Aug-06 4:19 
AnswerRe: Issues with HtmlHelp Pin
Sam Levy16-Aug-06 8:37
Sam Levy16-Aug-06 8:37 
GeneralRe: Issues with HtmlHelp Pin
Shaffiq16-Aug-06 20:03
Shaffiq16-Aug-06 20:03 
QuestionCImageList and CListCtrl Pin
Wim Engberts16-Aug-06 4:11
Wim Engberts16-Aug-06 4:11 
QuestionRe: CImageList and CListCtrl Pin
David Crow16-Aug-06 5:18
David Crow16-Aug-06 5:18 
AnswerRe: CImageList and CListCtrl Pin
Wim Engberts16-Aug-06 6:07
Wim Engberts16-Aug-06 6:07 
QuestionRe: CImageList and CListCtrl Pin
David Crow16-Aug-06 6:22
David Crow16-Aug-06 6:22 
AnswerRe: CImageList and CListCtrl Pin
Wim Engberts16-Aug-06 9:04
Wim Engberts16-Aug-06 9:04 

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.