|
-
November 23rd, 2004, 08:44 PM
#1
Getting the length of a string
Hey there,
I'm trying to get the length of a string so that I can determine when to stop copying items from it.
I have a string
System::String *szSourceLine;
which I load with a line from a file. (This is working correctly).
I am trying to find the length of this atring. I tried using both
szSourceLine->get_Length() and szSourceLine->Length();
but it gives me the error:
"term does not evaluate to a function taking 0 arguments"
Does anyone have any information about this?
Or if you have any information on another way to determine if you are at the end of a string, that would also be helpful. I was using
szSrcLine->get_Chars(i);
to get the characters out of the string, and thenprocess them. But once I reach the end of the string, I run into errors since I am accessing over the length of the string.
If you have any ideas on this, please let me know. It would be greatly appreciated.
Thanks
Danielle
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|