Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


giving id no

Posted on 1999-06-26
Medium Priority
Last Modified: 2010-04-15
how to give a id number in c. for example:
for (;;)
printf("id no :");
printf("name :");
and if reopen the program the number is still continue from what we have key in
Question by:eddyhalim
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1263021
I'm not sure I understand what you are asking.  If you give a bit more info on what you are trying to accomplish, I might be able to help...

LVL 10

Accepted Solution

viktornet earned 20 total points
ID: 1263022
let's see... one way is to load it from a file...

//Check to see if file storage.dat exists... if it doesn't then create it...

ifstream fin("storage.dat");
fin << (int) 23; //this is your first ID #....

if it exists, simply output the number to the screeen....

int id;"storage.dat");
fin >> id;

printf("id no: %d", id);



Expert Comment

ID: 1263023
woi, it's very easy man
i tell u the secret
see from  help files

ngiak ngiak ngiak

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question