|
-
October 8th, 2011, 05:37 AM
#4
Re: help C++ code
 Originally Posted by Peter_B
Hi,
I think you would benefit from taking this slow, coding one method at a time and testing it properly before going on to the next one. For example, from a quick look this code:
Code:
MyString::MyString(char arr[])
{
for(int i=0; i!='/0'; i++)
text[i]=arr[i];
}
has three errors in it, so there are no doubt numerous bugs in the more complicated methods. Run this method through the debugger (plus look at the compiler warnings as mine - g++ - gives one for the 'for' line) and check whether the 'text' array ends up as it should.
Hi!
thank you so much! yes trying to code one method at a time has showed me where exactly the program got stuck, actually invoking the constructor and how i implemented them was the major problem . thanks again
Tags for this Thread
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
|