Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > What's wrong with this piece of code?

Reply
Thread Tools

What's wrong with this piece of code?

 
 
xz
Guest
Posts: n/a
 
      03-13-2008
It's just a comman operator<<

friend std:stream& operator<<(std:stream& os, const Vertex& v){
return os << "(" << v.getX() << ", " << v.getY()<< ")";
};

The compiling error is:

Vertex.h: In function 'std:stream& operator<<(std:stream&, const
Vertex
&)':
Vertex.h:39: error: no match for 'operator<<' in 'os << "("'


Am I missing some subtle mistake there?
 
Reply With Quote
 
 
 
 
xz
Guest
Posts: n/a
 
      03-13-2008
Oh, I figured it out.....
 
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
any wrong with this piece of code? YYweii C++ 8 03-15-2008 12:33 AM
Download a file piece by piece Patrick Plattes Ruby 2 11-30-2006 07:48 PM
what's wrong with this piece of code peter.linotte@gmail.com VHDL 3 06-11-2006 11:21 AM
Airlink101 PCI cards, AVOID!! Piece of Garbage!! lasurfer25@yahoo.com Wireless Networking 0 07-22-2005 02:44 AM
Thunderbird - What a piece of **** coyote2@donotemail.com Firefox 24 03-07-2005 11:09 AM



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