Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > c++ code

Reply
Thread Tools

c++ code

 
 
ramtin
Guest
Posts: n/a
 
      06-01-2011
hello;
is anybody knows waht does " void Print (ostream &) const; " do ? and
it doesn't work in visual c++ ,plz help me . . .
thanks
 
Reply With Quote
 
 
 
 
Saeed Amrollahi
Guest
Posts: n/a
 
      06-01-2011
On Jun 1, 12:20*pm, ramtin <tom.t.2...@gmail.com> 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: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
 
Reply With Quote
 
 
 
 
SG
Guest
Posts: n/a
 
      06-01-2011
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
 
Reply With Quote
 
Puppet_Sock
Guest
Posts: n/a
 
      06-01-2011
On Jun 1, 5:20*am, ramtin <tom.t.2...@gmail.com> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between code inside a <script> tag and code in the code-behind file? keithb ASP .Net 1 03-29-2006 01:00 AM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM
Re: C# Equivalent of VB.Net Code -- One line of code, simple Ian ASP .Net 0 06-25-2003 01:14 PM
Re: C# Equivalent of VB.Net Code -- One line of code, simple Ron ASP .Net 1 06-24-2003 07:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57