c++ code

Discussion in 'C++' started by ramtin, Jun 1, 2011.

  1. ramtin

    ramtin Guest

    hello;
    is anybody knows waht does " void Print (ostream &) const; " do ? and
    it doesn't work in visual c++ ,plz help me . . .
    thanks
     
    ramtin, Jun 1, 2011
    #1
    1. Advertising

  2. On Jun 1, 12:20 pm, ramtin <> wrote:
    > hello;
    > is anybody knows waht does " void Print (ostream &) const; " do ? and
    > it doesn't work in visual c++ ,plz help me . . .
    > thanks


    Hi

    It depends to your code. Is it a member function of
    a class and it tries to change the state of object?
    Do you add
    using std::eek:stream
    or
    using namespace std;
    beforehand such declaration? ...
    BTW, I guess it's a declaration of a _constant_ member function
    of a class which may be prints the object into output stream.

    Regards,
    -- Saeed Amrollahi
     
    Saeed Amrollahi, Jun 1, 2011
    #2
    1. Advertising

  3. ramtin

    SG Guest

    On 1 Jun., 11:20, ramtin wrote:
    >
    > is anybody knows waht does
    >
    > void Print (ostream &) const;
    >
    > do ?


    It looks like a declaration of a non-static member function with the
    name Print that does not change the object it is invoked on and takes
    an ostream object by reference.

    My guess is that the function will send a textual representation of
    the object's current state to this ostream.

    > it doesn't work in visual c++ , plz help me . . .


    You havn't provided enough information for us to help you. Google for
    "how to ask questions the smart way".

    Cheers!
    SG
     
    SG, Jun 1, 2011
    #3
  4. ramtin

    Puppet_Sock Guest

    On Jun 1, 5:20 am, ramtin <> wrote:
    > hello;
    > is anybody knows waht does " void Print (ostream &) const; " do ? and
    > it doesn't work in visual c++ ,plz help me . . .
    > thanks


    The comp.lang.c++ FAQ is available at

    http://www.parashift.com/c -faq-lite/

    Please read down to the "how to ask a question" question.
    In order to answer your question we need more context.

    The context, by the way, would almost certainly answer
    your question for you.
    Socks
     
    Puppet_Sock, Jun 1, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    1
    Views:
    2,709
    Showjumper
    Jun 24, 2003
  2. Ian
    Replies:
    0
    Views:
    1,391
  3. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    599
    Alphonse Giambrone
    Jun 28, 2003
  4. =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=

    Fire Code behind code AND Javascript code associated to a Button Click Event

    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Feb 10, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    21,247
    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=
    Feb 11, 2004
  5. keithb
    Replies:
    1
    Views:
    920
    Bruce Barker
    Mar 29, 2006
Loading...

Share This Page