Click here to Skip to main content
15,891,848 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
string s="123456";
I can not see the value of s[0] in the watch table when I debug my code.
Instead, it shows me"CXX0058 :error:overload operator not found"
shouldn't s[0] be '1'?
Posted

you have to create a string buffer
just like
StringBuffer sb=new StringBuffer(s);
 
Share this answer
 
Comments
Nish Nishant 21-Apr-11 8:40am    
OP's talking about native C++ collections.
Himansu sekhar bal 21-Apr-11 8:48am    
ok,you are correct
Nish Nishant 21-Apr-11 8:51am    
I reckon I am! :-)
It's due to a debugger restriction with overloaded operators. You'll find the same with other types like vector<>.
 
Share this answer
 
Comments
solesonglei 21-Apr-11 9:06am    
thx.
Nish Nishant 21-Apr-11 9:14am    
You are welcome.
E.F. Nijboer 21-Apr-11 11:25am    
Nice. Learned something :-)
Sergey Alexandrovich Kryukov 21-Apr-11 14:57pm    
Good, a 5.
--SA
You can try memory window. Put there pointer to string buffer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900