Re: How to generate an auto ID (or Auto Number)
Your previous post? which one?
Re: How to generate an auto ID (or Auto Number)
This Forum is not for kidding! :mad:
So, please choose: either
Quote:
Originally Posted by
J_Freak
Nah nah..just a basic program for my school project..:)
or
Quote:
Originally Posted by
J_Freak
actually this is for a Bank
Re: How to generate an auto ID (or Auto Number)
Ahhh so sorry if I was not clear..its actually a project/assignment for school..and the assignment is about a bank..I've done everything else but couldn't figure out on how to do the "auto numbering" part..
Re: How to generate an auto ID (or Auto Number)
Quote:
Originally Posted by
J_Freak
Ahhh so sorry if I was not clear..its actually a project/assignment for school..and the assignment is about a bank..I've done everything else but couldn't figure out on how to do the "auto numbering" part..
Well, didn't you read the whole thread from the very begin?
Re: How to generate an auto ID (or Auto Number)
ha..thanx alot I've figured out the way...but now caught up with another mess..
all these details are suppose to be written to a "notepad" and this is the coding that I used for it
void write_account()
{
account ac;
ofstream outFile;
outFile.open("Customer.txt",ios::in|ios::binary|ios::app);
ac.new_account();
outFile.write(reinterpret_cast<char *> (&ac), sizeof(account));
outFile.close();
}
but I'm not getting the output properly..its like jumbled with unknown characters...
What's the issue here?
Re: How to generate an auto ID (or Auto Number)
Quote:
Originally Posted by
J_Freak
that I used for it
Code:
void write_account()
{
account ac;
ofstream outFile;
outFile.open("Customer.txt",ios::in|ios::binary|ios::app);
ac.new_account();
outFile.write(reinterpret_cast<char *> (&ac), sizeof(account));
outFile.close();
}
but I'm not getting the output properly..its like jumbled with unknown characters...
P Lease, use Code tags. Otherwise your code is hard to read/understand.
What is account? And why do you cast account* to char*?