|
-
May 27th, 2012, 12:24 PM
#31
Re: How to generate an auto ID (or Auto Number)
Your previous post? which one?
-
May 27th, 2012, 12:27 PM
#32
Re: How to generate an auto ID (or Auto Number)
This Forum is not for kidding! 
So, please choose: either
 Originally Posted by J_Freak
Nah nah..just a basic program for my school project.. 
or
 Originally Posted by J_Freak
actually this is for a Bank
Victor Nijegorodov
-
May 27th, 2012, 12:32 PM
#33
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..
-
May 27th, 2012, 12:40 PM
#34
Re: How to generate an auto ID (or Auto Number)
 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?
Victor Nijegorodov
-
May 28th, 2012, 06:07 AM
#35
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?
-
May 28th, 2012, 06:14 AM
#36
Re: How to generate an auto ID (or Auto Number)
 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*?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|