I have a requirement as follows.
I am writing a software to compute invoice .
The program will get the user details and it will autogenerate a INVOICE NUMBER.
So in order to auto generate the INVOICE NUMBER, i tried to use file concept.
I save a integer in a file. Then i read the content of the file and get the integer . I increment the value by 1 and use it as INVOICE NUMBER. Then I save the new INTEGER in the same file.
i used the getw() and putw() functions. But it genrates exception.
The code is getting compiled, but It couldn't execute.
Please help me what I should do.
Or is there any other method to have this AUTO GENERATION of my INVOICE NUMBER.