Changes

Jump to: navigation, search

Assignment 1: Q & A

315 bytes added, 16:00, 20 September 2012
no edit summary
'''A:''' I have (Kevin from Team 9). What kind of crash are you talking about? Everything works fine when I compile.<br>
'''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)
'''A:''' List any dynamic allocations you are using (and check for doubled delete [] statements), and refer to [http://www.efnetcpp.org/wiki/Heap_Corruption this page] for more information on potential problems.
Also, make sure that you're not offsetting or repositioning past the end of the string allocation (maxStrLength). That could cause problems. (Answered by Team 9)<br>
'''A:''' I tracked the issue down. The a1test.cpp sets ROW_ERRORS to 22 and then does row++ after every error. This 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>'''Submitted by:''' Team 6 <br><br>
== Bug Report ==

Navigation menu