i didn't mean that using .h files makes your program non standard. it has a lot of other issues too. you have included too many library files, and haven't used them.
main is not returning any value.
identifiers are not following conventions.
no comments are used to make any other programmer aware of whats happening in the program.
record.txt file is stored in the same place your exe file is stored. you can also provide a full path in the codes, like, "c:\RecordManager\Database\record.txt" etc. I just presented an example.

data structures organise data and store it in an efficient way. You don't want data to be cluttered and disorganised, do you?
also, we want to make maximum use of disk space and we also want the data access time to be as low as possible. But both of these requirements are hard to be met in one data structure.
some data structures provide minimum access time, while other use space judiciously. hence we can use the appropriate data structure according to our requirements.

i would say that is a very poor code. you're missing the indentations, and the code is not generic as it doesn't follow the conventions. its hard to understand for any other programmer.
you can IO using classes and objects as in your case. follow this code and you'll get the idea of IO using objects. But the file created this way is binary.



using namespace std ;

class CRecordManager
int m_num ;
char m_name [30] ;
void fnRecord ( void ) ;
void fnDisplay( void ) ;

void CRecordManager :: fnRecord ( void )
cout << "EMPNUMBER: " ; cin >> m_num ;
cout << "EMPNAME: " ; cin >> m_name ;
void CRecordManager :: fnDisplay( void )
cout << "Employee Number: " << m_num << " and " << "Employee Name: " << m_name << endl ;

int main()
CRecordManager oEmp01 ;
oEmp01 . fnRecord() ;
ofstream oWrite ; // Object to write to file
oWrite.open ( "Record.txt") ; // details stores in this file
oWrite.write( (char * ) & oEmp01 , sizeof ( oEmp01 ) ) ; //Writing to file
oWrite.close() ;

cout << endl << endl ;

ifstream oRead ;        // obj to read frm file
oRead . open ( "Record.txt" ) ;
oRead.read ( (char * )  & oEmp01 , sizeof ( oEmp01 ) ) ;        // reading
oEmp01 . fnDisplay () ; // display the contents read
oRead.close() ;

system ("pause") ...

spades are swords of a soldier, clubs are the weapons of war...

you're not getting it; no one can help you unless you tell us what the program does in the first place, i don't know what lotto 6/55 is.
Post your question in simple language and specify what are the inputs and outputs of the program and what does the program do.
and use code tags. code is hard to read without them.

post the code you tried, if any.

yeah, an explanation would have helped.

It may be possible, and i strongly feel it is, but i can't tell you for sure unless i don't know the exact problem. you may post the question so other members can help too. But yeah, always post the code you tried. Good Luck.

[QUOTE]It was spam anyway.

I don't get it. The program worked fine with me, and it's got no main().

One, i don't get the question? What does the program do? and two, do you seriously want us to do your work? Work on the question, post the code and we'll try to rectify. That's the real purpose of the forum. Hope you get it.

king kisses queen :P

stink---> sewer

mouth---> breath

cake of the day

champion in making

same side of the line

engaged --> divorced

Google it, you'll find plenty of info

up for grabs

Size of a pointer in c++ does not vary with datatype, as it's just a pointer pointing to a memory location.
For a 32-bit system, i guess it's 4 bytes.


rectum stores stuff for dispensing later

booty --> booty hunter Indiana Jones

anus is the area of specialization of a proctologist

beans make you fart

competitive --> kickass

pay your tax in FULL

enjoyable cupppa of coffee

nucleus ---> tough

Degree without a re-appear ain't no fun.