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 » U++ Library support » U++ Core » Small fix for Find in Algo.h
Re: BUG for Find in Algo.h [message #34943 is a reply to message #34776] Mon, 19 December 2011 10:10 Go to previous message
gridem is currently offline  gridem
Messages: 45
Registered: August 2008
Member
There are 2 issues:

1. You should check iterator for NULL. This is difference between STL and U++.

2. You should use reference instead of value:


The correct code is:
			if (it != NULL)
			{			
				CAppli& apptmp = *it;              // use reference
				apptmp.update();
 
Read Message
Read Message
Read Message icon13.gif
Read Message
Read Message
Read Message
Previous Topic: A probably simple question about pick semantics
Next Topic: Preferred way to access VectorMap
Goto Forum:
  


Current Time: Mon Jun 16 22:43:49 CEST 2025

Total time taken to generate the page: 0.04089 seconds