Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Trouble with pointers.
Re: Trouble with pointers. [message #11169 is a reply to message #11168] Sat, 25 August 2007 08:38 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Reference and pointer is not the same thing.

"temp" is pointer, but you are trying to return the reference there.

You have to use "*" to convert a pointer to a l-value, which is then convertible to reference. You have to use "&" to convert l-value or reference to a pointer.

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: How to use string array with functions?
Next Topic: File List with FtpClient
Goto Forum:
  


Current Time: Wed Apr 24 12:42:59 CEST 2024

Total time taken to generate the page: 0.29118 seconds