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++ Library : Other (not classified elsewhere) » string[] causes many overload complaints
Re: string[] causes many overload complaints [message #20234 is a reply to message #20228] Mon, 02 March 2009 16:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
mr_ped wrote on Mon, 02 March 2009 04:15


And AFAIK there's no special use for negative index values in NTL containers, ranges are always from 0, so if I would design the NTL containers, the basic [] operator would work with unsigned type, not signed. Probably breaking the convention of many programmers writing "for (int i=0; i<max; i++)" ... I never care too much about conventions anyway, unless they make sense, and this one does not.


Relative offsets can be negative. Obviously, in the end it always ends as positive number, but values involved in computing the index value can be negative. Using 'int' may avoid some casting (or equivalent warnings).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linking problem with socket
Next Topic: n-State Button
Goto Forum:
  


Current Time: Tue May 14 16:30:36 CEST 2024

Total time taken to generate the page: 0.01906 seconds