CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Posts
    67

    Buffer as a parameter

    Hi, i am trying to use a buffer before sending it to a canvas, and I am having problems finding out how to set the buffer as a parameter in one of my classes. Im doing this:

    Code:
    void Muestrate(BufferedGraphics ^buffer);
    This is the same way i used to set a canvas a parameter, although it wont work with the buffer. I keep getting a syntax error. Any help please? Thanks in advance.
    Last edited by limpit; November 6th, 2009 at 12:42 AM.

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Buffer as a parameter

    I keep getting a syntax error
    It never occurred to you to post that error ?

    Also, you are using C#, so you are in the wrong section. This is for C++.

  3. #3
    Join Date
    Sep 2005
    Posts
    67

    Re: Buffer as a parameter

    No, I am using Visual C++ Express Edition 2008. And the error is:

    Code:
    error C2061: syntax error : identifier 'BufferedGraphics'

  4. #4
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Buffer as a parameter

    No, I am using Visual C++ Express Edition 2008
    ... but you are writing your code not in C++.

    Code:
    void Muestrate(BufferedGraphics ^buffer);
    the ^ is not C++.

  5. #5
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Buffer as a parameter

    It's MSC++/CLI so this thread should be in the managed C++ forum.

  6. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Buffer as a parameter

    Quote Originally Posted by limpit View Post
    No, I am using Visual C++ Express Edition 2008.
    Please know the tools that you're using.

    You are using something called "Managed C++". Managed C++ is a superset of C++, using inventions that are not "true" C++. That "^" character is nonsensical to the "true" C++ language in the context that you're using it.

    In true C++, the "^" character is an exclusive-or. So to this forum, you are passing a paramter that is an exclusive-or, so this makes it non-sensical to this group.

    For Managed C++, that symbol does make sense, but this is not the Managed C++ forum.

    Regards,

    Paul McKenzie

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