This Code & Database work fine after you input Pin code the information of the pin code will shown on the screen,but now the "PROBLEM GIVEN" is the "record.txt" is located in your Desktop "C:\Documents and Settings\Desktop\record.txt" and the Data file formation written in "record.txt" look like this.
John_Wright,E1-1000,1
Robert_Hood,E1-1001,2
Note:You are not able to edit this Database, you also not able to create new database, you also not able to remove your database in your desktop and move to C:\ or create desktop create shortcut comes from C:\.The database strictly located at "C:\Documents and Setting\Desktop\record.txt".
This is the problem and hard to search the pin code located at the center of data information and also hard to connect to desktop location but in C:\ its error free. I hope someone could help and thanks in advance...
This is the problem and hard to search the pin code located at the center of data information and also hard to connect to desktop location but in C:\ its error free. I hope someone could help and thanks in advance...
I don't understand what you want to say. Please, repeat it, and be more concise.
You have to read carefully for you to understand!
As i said How do you access this kind of database Located at C:\Documents and Setting\Desktop\record.txt and the database is look like this...
John_Wright,E1-1000,1
Robert_Hood,E1-1001,2
Now to indicate what this data stand for is like this John_Wright = Name,E1-1000 = pinCode,1 = Position,Robert_Hood = Name,E1-1001 = pinCode,2 = Position.
Now the task is:
1.When you run the Program the system will ask you to enter your pincode.
2.After you enter your pincode, the system will going to search the pincode in your database.
3.Then after searching your pincode in your database, the system will going to print your pincode information on the screen.
4.And if your Position = 1 then the Rate = 200,and if your Position = 2 then the Rate = 300.
Example:
step-1(the system will ask to enter pincode)
Enter Pin Code: E1-1000
step-2(the system will search your pincode in your database located at C:\Documents and Setting\Desktop\record.txt) And the system will print on the screen the pincode information.
Name : John_Wright
Position: 1
Rate : 200
Note:You are not able to edit this Database, you also not able to create new database, you also not able to remove your database in your desktop and move to C:\ or create desktop create shortcut comes from C:\.The database strictly located at "C:\Documents and Setting\Desktop\record.txt".
That Tutorial works for this kind of database that located on "C:\record.txt and the database are look like this...
E1-1000
John_Wright
1
200
E1-1001
Robert_Hood
2
300
What if the database are located at "C:\Documents and Setting\Desktop\record.txt" and the database are look like this...
John_Wright,E1-1000,1
Robert_Hood,E1-1001,2
Note:You are not able to edit this Database, you also not able to create new database, you also not able to remove your database in your desktop and move to C:\ or create desktop create shortcut comes from C:\.The database strictly located at "C:\Documents and Setting\Desktop\record.txt".
Well, use the formatted extraction from a stream operator >>. You can also use stringstream objects. Look that up in the reference.
By the way: This is OBVIOUS HOMEWORK.
No, this is not a homework, this is what i got in my exam applying in the company that until now i need to resolve the given problem coz' the company given me a chance to retake this kind of exam.The only problem is i cannot connect to the database located at "C:\Documents and Setting\Desktop\record.txt" and the pin code is placed at the center of horizontal type data information that look like this...
John_Wright,E1-1000,1
Robert_Hood,E1-1001,2
where E1-1000 and E1-1001 is the Pin code in the given horizontal type data information.
If the database information is in vertical type, there is no problem and i can search it that look like this...
E1-1000
John_Wright
1
200
E1-1001
Robert_Hood
2
300
But there is the reminders and this is the reminders.
Note:You are not able to edit this Database, you also not able to create new database, you also not able to remove your database in your desktop and move to C:\ or create desktop create shortcut comes from C:\.The database strictly located at "C:\Documents and Setting\Desktop\record.txt".
If this really is an exam for a company, then you should know this stuff, otherwise you shouldn't be working there probably. >_>
As i said the company is given me a a chance to retake this kind of exam actually we are 15 applicants and sad to say no one passed the exam xD...But after the exam they conduct an interview 1 by 1 and i passed the interview, the only problem is the given database is something weird or it is a something a puzzle and 1 thing is the location of database is located on the desktop that normally it is located in C:\record.txt.
The only thing I see weird about the location, is the lack of a user directory
eg. C:\Documents and Setting\#user id#\Desktop\record.txt
but that doesn't mean to say that they haven't set up a 'Desktop' directory under 'C:\Documents and Setting'.