What is this ?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: What is this ?

  1. #1
    Join Date
    Dec 2003
    Posts
    220

    What is this ?

    &gt

    Thanks and Regards

    homestead

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,062
    A larger-then-sign

  3. #3
    Join Date
    Nov 2003
    Location
    Vienna, Austria
    Posts
    212
    A larger-than sign actually.
    All the buzzt
    CornedBee

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,062
    oops, typo ...

  5. #5
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    'larger-than'? uh....

    > Greater-Than
    < Less-Than
    >= Greater-Than-Or-Equal-To
    <= Less-Than-Or-Equal-To

    I'm sure they can be overloaded, so if you seen it somewhere and you don't know why, it may not neccessarily mean what I just said.

  6. #6
    Join Date
    Dec 2003
    Posts
    220
    I am really sorry for not reading my post again. I didnt know that because VB code changed when directly writing
    & gt
    I meant that gt...

    Really sorry, I know it is an easy question to you, so please help...

    Thanks a lot,

    Regards,

    Fiona

  7. #7
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128
    In C/C++ context, you are retrieving the address of the variable gt. However, in HTML context, "&gt;" is a representation for '>' character on the browser.

    Hopes that I answer your question.

  8. #8
    Join Date
    Dec 2003
    Posts
    220
    Originally posted by Kheun
    In C/C++ context, you are retrieving the address of the variable gt. However, in HTML context, "&gt;" is a representation for '>' character on the browser.

    Hopes that I answer your question.
    I know I am a newb and my questions are really very newb's, but it s true, I have seen it declared in the #include headers, I dont understand why, so I made questions...

    Regards,

    homestead

  9. #9
    Join Date
    Dec 2003
    Posts
    220
    PHP Code:
    class MyClassImpl;
    class 
    MyClass
    {
    public:
    int Method1();
    // Public methods, etc.
    private:
    MyClassImplpimpl;
    };

    // MyClass.cpp
    #include "MyClassImpl.h"
    MyClass::MyClass pimpl(new MyClassImpl)
    {
    }
    int MyClass::Method1()
    {
    return 
    pimpl-&gt;Method1();

    it was used without even declaration ?

  10. #10
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128
    Ah... I think I got what it is trying to do. Actually, my previous reply indirectly answer your question. The code you are displaying, uses the Pimpl idiom where certain implementation of the original class is extracted into a separate implementation class. When we want to invoke a function in the original class, it is usually redirected to invoke the function in the implementation class.

    BTW, please don't take it too hard on my previous reply. As many other has pointed out, it usually helps to understand your question if you can show us some codes.

    Code:
    class MyClassImpl;
    class MyClass
    {
    public:
        MyClass();
        int Method1();
    
    // Public methods, etc.
    private:
        MyClassImpl* pimpl;
    };
    
    // MyClass.cpp
    #include "MyClassImpl.h"
    MyClass::MyClass() : pimpl(new MyClassImpl)
    {
    }
    
    int MyClass::Method1()
    {
        // Due to some html formatting, you see "pimpl-&gt;Method1()".
        return pimpl->Method1();  
    }
    Last edited by Kheun; January 14th, 2004 at 10:34 PM.

  11. #11
    Join Date
    Dec 2003
    Posts
    220
    I am sorry I didnt know that
    I mean pimpl->Method1();. I just went there, copied and pasted it here.
    Thanks Kheun very much for your explanation,

    Regards,

    Fiona

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center