Programming

Turbo C++ Duplicate ID’s

November 10, 2013

Fellaz, sorry for the super duper late upload here in this category,, cuz my other net book was damaged.. so here’s it is!

To execute the said program, here’s a sample one..

So, here are some of the menu items.. #1 for the record entry, #2 for Displaying all Records, #3 for Displaying nth Record and #9 to clear File. Since our focus is to delete the duplicate ID’s.. let’s assume that the #3 is not there. πŸ˜€

step1

1. First of all, you need to record first your input data. Just press #1 on your keyboard..

2. Second, as you pressed the #1 which is the Record Entry, the machine will asked you for the Student ID number and the Students’ name

step2After you typed the desired ID number and name , it will be added to the file. After that, it will return to the main menu again..

3. If you inputted the same ID number, and different name.. it will be invalid ID, and sent it to myfile2.dat, it is because the first one has the ID# of 1111 which is the same as the second one. But the names are DIFFERENT. Here’s the output :

step3

4. If you want to Display the records that you encoded earlier.. just press #2. So, it will look like this! πŸ™‚

Untitledee

As you observed, that Student number 1111, Student name ‘Darlene’ was not there, it is because.. If the inputted data finds a duplicate ID’s.. it will automatically excluded. πŸ˜€

For clarification or questions, just don’t hesitate to write a comment in the comment box! And I’ll try my best to answer/help you as long as I can. πŸ™‚

 

till next time!

-tinay<3

No Comments

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.