473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

correct way to access an ID from a file ???

9
outStaffID.seekg(0);
outStaffID.read(reinterpret_cast<char*>(&StaffReg) , sizeof(StaffPersonal));
while(outStaffID && !outStaffID.eof())
{
outStaffID.read(reinterpret_cast<char*>(&StaffReg) , sizeof(StaffPersonal));
cout<<StaffReg.getStaffID();
outStaffID.close;

do {
SstaffID = (2 + rand() %3);

}while (SstaffID == StaffReg.getStaffID());

SstaffID = SstaffID;

from the above program... u can see that i cout the value of staff ID store in the file = cout<<StaffReg.getStaffID(); but the value is not as what i entered.. it will display something like .. 33... 03... 334... any1 can hlep me in this ?
Apr 29 '07 #1
0 856

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Al Repasky | last post by:
The program I have written with VB/NET 2003 has a Myapp.exe.config file that I did not know I would be creating. My program using an Access db and can not find the DB file after building the...
11
by: MLH | last post by:
I was reading up on A97 security and found a blurb saying Microsoft Access provides two traditional methods of securing a database: setting a password for opening a database, or user-level...
2
by: Henry | last post by:
I am trying to write an application that allows me to dynamically load selected Crystal Report files, read the parameters from the report file, give the user a chance to enter relevant data in a...
2
by: Mark Ingram | last post by:
Hi, whats the correct way of opening up a different applications configuration file? i.e. i want to open someotherapp.exe.config and read the settings contained in "applicationSettings". Ive...
2
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. I'm using a web form. During testing, i guess i installed and...
4
by: webEater | last post by:
everytime i test my websites in ie (which should be done seperately from ff) the console shows me the error and the line number. problem: it shows me the line number of the file of the error's...
2
by: thisis | last post by:
Hi All, I need the PUBS.mdb for pulling images: PUBS.mdb must have the table: pub_info tbl_pub_info : has 3 fields Data_Type : ok Data_Type : ok
1
by: brett | last post by:
I have several pages that need to use a method I've written that streams in text file content. I added a CS file to my website and named it Utilities. It has two static methods. One method reads...
3
by: bobdydd | last post by:
Hi Everybody I still have plenty of databases written in Access 2000 although I would like to write future databases in Access 2003. Assuming I have both versions on the same machine, is it...
1
by: Taras_96 | last post by:
Hi everyone, I'm using PHP and a DB to control access to files that have been uploaded by users. I am using the following PHP code snippet to deliver the file after the access rights have been...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.