I've been staring at this code for too long

Oct 22, 2006 17:51

So i have had this problem with part 3 since last weekend. And i have stared at it for hours. I have asked for help from a few people to see if they can help me debug it. (this includes one of my TA's.) any one who has left, has had a serious headache afterwards.

I just found the bug that's been causing me problems this entire week.
In my extend fuction, i was calling the following line of code to grab the data i want to add new data sectors too:
hdr->fetchfrom(lastUsedTable)

looks logical. compiles correctly. something that easily is brushed over. but that line was wrong. instead, i should have written the following line of code:
hdr->fetchfrom(dataSectors[lastUsedTable])

That was the root of my weeks worth of problems in this section. that one word i forgot to put in. after the allocations were made, the code then overwrote my original data in the table. thus, causing lots of problems in my output.

*screams in pain/rejoice that its fixed*

now onto part 4. this is due in 12 hours. i'll most likly be submitting this in late. =(

rant, gradwork, programming

Previous post Next post
Up