473,320 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error: no match for 'operator<<' in 'std

i cant seem to find any fault, can anyone point out the error?
Expand|Select|Wrap|Line Numbers
  1. void Itinerary::print()
  2. {
  3.      list<Place>::iterator i;
  4.      for(i = placelist.begin(); i != placelist.end(); i++) {
  5.         cout << *i << endl;    //error
  6. }
  7.  
  8.  
  9.  
  10. 28 C:\Dev-Cpp\itinerary\Itinerary.cpp no match for 'operator<<' in 'std::cout << (&i)->std::_List_iterator<_Tp>::operator* [with _Tp = Place]()' 
  11.  
Thanks =)
Feb 2 '07 #1
1 8554
Ganon11
3,652 Expert 2GB
Have you provided a << overload for the Place class?

You will need to have a function in Place with the following header:

Expand|Select|Wrap|Line Numbers
  1. friend ostream& operator<<(ostream&, const Place&);
Feb 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Gianni Mariani | last post by:
Can anyone enligten me why I get the "ambiguous overload" error from the code below: friendop.cpp: In function `int main()': friendop.cpp:36: ambiguous overload for `std::basic_ostream<char,...
14
by: lutorm | last post by:
Hi everyone, I'm trying to use istream_iterators to read a file consisting of pairs of numbers. To do this, I wrote the following: #include <fstream> #include <vector> #include <iterator> ...
8
by: Ook | last post by:
This is my code in it's entireity: #include <iostream> using namespace std; template <typename T> class SortedList { public: friend ostream& operator<< (ostream& os, const SortedList<T>&...
4
by: rjd | last post by:
Does anybody else see this in VS.NET 2003? When I get a genuine C++ compiler error (could be anything, usually innocuous) it's regularly followed by a slew of these spurious and completely...
6
by: Andreas | last post by:
Hi, to output the private data of a class I want to overload the operator<<. The Output should be written in a string-variable. To do this i have written the attached code: But the...
7
by: imutate | last post by:
How do I implement << ala std::cout for vector template ? I already have the following: #include <vector> template < typename T > class Vec : public std::vector< T { public: Vec() { } Vec(...
6
by: Bobrick | last post by:
Hi. Thanks to everyone who replied to my last post, it turns out it wasn't the line where I was trying to treat the variable in question as an array which was the problem, but the line above. ...
8
by: Goran | last post by:
Hi all, I have a question regarding operator <<. A lib of mine contains a class with an overloaded operator << as NON- class member. This would look like: #include <iostream> #include...
3
by: eiji.anonremail | last post by:
Hi folks, I have a compile problem on linux, and maybe someone has an idea: #include <map> #include <iostream>
5
by: JerryBrit | last post by:
When compiling the below I get the following error: no match for 'operator<<' in 'log << std::endl' main.cpp Why can't I use std::endl in my class? #include <iostream> class Logger { ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.