This code compiles but performs an illegal operation when i run it. It was fine until i added lines 41 & 42. I put these lines in so that the function would break out of the loop when it came to the end of the string. Could someone please tell me where it is wrong.
Just a solution to your problem : To overcome the errors of putting an assignment operator instead of an equality operator you could do the following :
Code:
if((endlength - 1) == s[i])
{
s[i] = ',' ;
}
by applying this practice if you happen to put the following statement by accident, as you did :
Code:
if((endlength - 1) = s[i])
{
s[i] = ',' ;
}
then the compiler would flag an error stating that the left operand must be an l-value.
Hope that has helped
Regards
John
My reply postings are being treated as new threads... must be my crap ISP, which is constantly crapping out on me!
Ask a question and you're a fool for three minutes;
do not ask a question and you're a fool for the rest of your life.
- Chinese Proverb
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.