Hey kids, I know that you will be able to spot the mistake and that it 
would sound stupid to you, but I am tired and I cannot find where the 
problem lies. The code bellow was working when using MinGW-32bit, but 
now that I have upgraded to MinGW-64bit... I am having problems. No! 
Wait, I think the problem started before the 64bit. Anyhow, it does not 
matter, the point is that is giving me trouble.
Bellow is the snip of the hpp, cpp and the main.cpp of the program

hpp file
~~~~~~
class io_base{
.....
virtual io_base& operator<<( bool& )  throw ( some exception );
};

cpp file
~~~~~~
// input data
io_base& io_base::operator<<( bool& data )
throw ( some exception  ) {
   bla, bla, bla.

   return *this;

}


main.cpp
~~~~~~~
     bool tstingb = false;
     io_base infile;
     .... open an existing file for writing into it and then .....
     //inset the value of 'tstingb' into the file stream
     infile << tstingb << endl; // <<<----- Here is where the compiler
gets a crack out of me

COMPILER
~~~~~~~~~
===
error: no match for 'operator<<' in
'infile.io_base::operator<<(((bool&)(& tstingb))) << std::endl'
===
That part is not so confusing as it is the note from the compiler that
follows that statement:
====
note: candidates are: virtual io_base& io_base::operator<<(bool&)
====
That message is disconcerting; because I AM passing a boolean variable
to the overloaded operator.


What am I doing wrong?
Any body?




------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to