vita e bella

May 10, 2009

Filed under: Uncategorized — Lindsay @ 8:32 pm

*sob* why did I open my project again? WHY?

option 6 is broken. once you modify a record, you can’t find it. boo

I thought I had tested it, and I don’t know where the problem is…

*deep breath* it is over. move on…

May 8, 2009

DONE!!!

Filed under: Uncategorized — Lindsay @ 9:31 pm

cody reminded me I ought to mention this on here…

I’M FINISHED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*sigh*

now to stay up all night and move out…

status update

Filed under: Uncategorized — Lindsay @ 1:44 pm

MasterData methods left to write
- ModifyRecord

options working
- 1
- 2
- 3
- 4
- 5

:D
:D

status update

Filed under: Uncategorized — Lindsay @ 11:59 am

MasterData methods left to write
- DeleteRecord
- ModifyRecord

options working
- 1
- 2
- 3
- 4

:D

May 7, 2009

maybe!

Filed under: Uncategorized — Lindsay @ 2:45 pm

I am currently in the process of fixing my search. hopefully this works.

Thanks everyone for responding to my cry of help.

Especially Zac!

is the end attainable??

Filed under: Uncategorized — Lindsay @ 1:51 pm

Even though I have been working almost nonstop for days, I am hardly making any progress.

My search is not working, and I can’t figure out how to fix it.
in option3:
- I create a master file on the heap.
- I initialize an SSN object (inSSN) with the user input
- I call my search in the following line:
int RecNo = masterFile->Search(inSSN);
- I declare a Person object, record, on the heap
- I call ReadRecord with the following line:
*record = masterFile->ReadRecord(RecNo);
- I call display(*record);
- I delete masterFile

in MasterData::Search
- I create two character arrays of 9 characters, fileSSN and searchSSN
- I copy the string from the SSN that was passed into the function into searchSSN using:
strcpy(searchSSN, inSSN.NoHyphens().c_str());
- (Note: I have tested these numbers, and the conversion works)
- I declare/initialize some integer variables:
int firstRec=RECSIZE, lastRec=(GetNumRecs()*RECSIZE), midRec, compare;
- I begin a while(true) loop
- I have the test statement:
if(firstRec > lastRec) {return 0;}
- I initialize midRec to (lastRec + firstRec)/2
- I move the read pointer to midRec:
file.seekg(midRec);
- I read from the file into fileSSN:
file.read(fileSSN, 9);
- Note: The above statement seems to be where the problem occurs. When I print fileSSN, it seems to be reading more than 9 characters. Then, my compare totally fails…
- I call file.flush();
- I compare the two char arrays:
compare = strcmp(searchSSN, fileSSN);
if(compare==0) {return midRec/RECSIZE;}
else if(compare < 0) {lastRec = (midRec - RECSIZE);}
else if(compare > 0) {firstRec = (midRec + RECSIZE);}
- I end my while loop
- I delete fileSSN and SearchSSN

What is wrong??? I can e-mail code if necessary. If someone will respond. please. :’(

oh. my. gosh.

Filed under: Uncategorized — Lindsay @ 2:04 am

I have just spent the most ridiculous amount of time trying to spot the simplest error ever.

On my search function, I forgot to actually name the SSN object I was passing in. Instead, I was just using SSN… wow. wow, wow, wow. *sigh*

I wish I would have been in the lab for this one. Someone would have caught it!

May 6, 2009

new(ish) plan

Filed under: Uncategorized — Lindsay @ 6:35 pm

Since I have already written every function I need to write option 3 except Search and the actual display method, I will do those next, and then make option 3.

:)

this is frustrating

Filed under: Uncategorized — Lindsay @ 5:43 pm

I want to work on my project, but my paper is due tomorrow! I also have to start studying for biology. This really sucks.

Filed under: Uncategorized — Lindsay @ 12:36 am

Option 2 now working! :)

I had a plus sign where I needed a *. This was a bit confusing, since it seemed to work for State…

Search & Sort are next on the agenda.

Next Page »

Powered by WordPress. Hosted by Edublogs.