operator <<

Dharmendra Bhojwani <[email protected]> Wed, 11 Oct 2006 21:27:34 -0700 (PDT)
Newsgroups gmane.comp.video.openexr.user
Message-ID <[email protected]>
Hi Thanks for the response...
   
  But we get ambigous error sometime when operator doesn't know for particular type whether it should call the operator <<  function or not .
   
  In this case iDataSize is a unsigned __int64 and compiler doesn't have the operator to work on this datatype and even i can't reinterpret_cast also on this because information will be lost.And even if i provide operator << for unsigned __int64 , it works fine in vc++ but not in g++ , can you please look into this problem ?
   
  Thanks

Nick Porcino <[email protected]> wrote:
          you probably have more than one conversion possible on iDataType or iDataSize to a type ostream can accept. one way around it is to coerce the variables to a particular type so the compiler becomes un-confused. Hope this helps
   
      
---------------------------------
  
  From: [email protected] [mailto:[email protected]] On Behalf Of Dharmendra Bhojwani
Sent: Wednesday, October 11, 2006 5:23 AM
To: Linux
Subject: [Openexr-user] std::operator<<

   
    Hi Everybody,

     

    I have got some error in my code....

     

    I have one function like....

     

    
void CSISHeader::Dump (std::ostream& aStream, const int aLevel) const
 {
 aStream << "|" << iDataType << "," << iDataSize << "|";
 }

     

    AND i am getting error  while compiling with g++

     

     error: ambiguous overload for 'operator<<' in 'std::operator<<

     

    Can anybody please help in this ?

     

    Thanks

    


 		
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

_______________________________________________
Openexr-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/openexr-user