A weird bug I cannot seem to catch..
pastebin . com / esxAR3wY
This is my source code here...It is simply too big and ugly to fit in here, so I used this site..
If anyone can paste the code into his compiler and help me I will be grateful.
Everything works except for the "addEntry" function (and I am guessing "resizeArrayCopy" function too)..so if you are willing to help me, look there.
My problem basically is:
When I set the buffer size to 4, then load a file that has 4 entries, then I try to add a new entry from the menu, entry number FIVE just shows up blank after that. Entries after this entry are perfectly fine tho.
When I load a file that has less than 4 elements, then fill up the buffer with my data, the FIFTH element shows some strange characters, and (I think, not 100% sure) that in this case, entries six and onward work perfectly. I have been trying to catch the problem this entire day, and couldn't. If you are willing to help me, you definately need to compile the code and run the program in order to see for yourselves what exactly is wrong, since the code is very ugly written and it is (quite) big..
PS: compiling with codeblocks
Re: A weird bug I cannot seem to catch..
Can you do a text-mode screen shot (and just paste it in here) to show the input you gave and the output you got? Also state (a) what output was expected, and (b) the implication is that there is a text file that the program relies on, so what is in it?
|All times are GMT +5.5. The time now is 19:09.|