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 |
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
|
|
|
Goto Forum:
Current Time: Sun Apr 28 20:42:06 CEST 2024
Total time taken to generate the page: 0.02521 seconds
|