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: 14267
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: Sun Aug 17 08:54:26 CEST 2025

Total time taken to generate the page: 0.00618 seconds