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
string[] causes many overload complaints [message #20224] Sun, 01 March 2009 18:17 Go to previous message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
I had a code:

unsigned int i=0;
String s;
if (s[i]==' ')
{

}

and Microsoft Compiler complaint a lot (cannot decide which
overload to use....


because of s[i]


My solution was to add:

int operator[](unsigned int i) const { ASSERT(i >= 0 && i <= B::GetCount()); return B::Begin()[i]; }

line in String.h





 
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: Sun Apr 28 20:42:06 CEST 2024

Total time taken to generate the page: 0.02521 seconds