CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    1,689

    Could someone compile this for me?

    I wrote some VC++ specific optimizations in a library I maintain and I just want to make sure that I have the syntax correct. I don't own a Windows machine, nor does the office, so I can't do it myself.

    Code:
    #ifndef _MSC_VER
        #error, Not VC++
    #endif
    
    #pragma pack(push, foo_pack, 1)
    class foo { 
        bool __declspec(nothrow) bar(void) const; 
    };
    
    bool __declspec(nothrow) foo::bar(void) const {
        return true;
    }
    #pragma pack(pop, foo_pack)
    
    
    int main(void){ 
        return 0;
    }

  2. #2
    Join Date
    May 2005
    Location
    Estonia
    Posts
    235

    Re: Could someone compile this for me?

    Compiled successfully with VS 2008 Express.
    Rate my post if i it was useful!

  3. #3
    Join Date
    Jan 2009
    Posts
    1,689

    Re: Could someone compile this for me?

    Thank you very much

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured