1
edit
Changes
no edit summary
'''Q:'''It compiles, but when we edit the line for the first time and then press enter, then it crashes.<br>
'''A:''' Make sure that you aren't overwriting the null byte at any point in the editing. After terminating the edit() function, a1test does a strcmp() of str and the successful string. If str is missing a null byte, it might be strcmp() crashing your program. Are you getting a seg fault? (Submitted by Team 9)<br>
'''A:''' Make sure your console window is long enough. The a1test.cpp sets ROW_ERRORS to 22 and then does row++ after every error. If your console is smaller than ~30 rows this makes the program try and print outside the screen and it crashes! (Answered by Team 6) <br>'''A:'''Julian Burton solved my problem. At the beginning I declared <br>char* original; original = new char[strlen(str) + 1]; strcpy(original, str);<br>but the size wasn't enough, so instead of strlen(str) + 1, I changed that to new char[maxStrLength + 1], and then it worked.<br>'''Submitted by:''' Shayan Vaghei & Mohamed Baig Team4<br><br>
**press left key
**press right key
'''Submitted by: '''Shayan Vaghei & Mohamed Baig Team4.<br><br>
== Possible Additional Features: ==