Thread: having specific users

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    11

    having specific users

    How do you save someones set entries???
    to be clearer, I have a program where the user types in their products and amount that they have in their fridge...but once the program is over, all that memory is lost and the user, if it is the same person, has to type in again all the products in their fridge?? is there any way in which to avoid them retyping it, like having a user profile???

    Ilan

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Welcome to the wide world of files! Might I suggest:
    fopen to open or create a file.
    fclose to close a file.
    fread to read a file.
    fwrite to write a file.
    And here for a lot of other 'f'-ing functions.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    11
    ok thanx for your help..Having a little trouble understanding it all...just staretd programming. so to make a file or to start a database I use the:

    size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream);
    what do I put into all the variables??

    then...nce the person has rejoined and enters their user name, I used the:
    printf("What is your username? ");
    scanf("%s", name);
    FILE *fopen(const char * name,const char * r+);
    is this all??

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function validation.
    By Fhl in forum C Programming
    Replies: 10
    Last Post: 02-22-2006, 08:18 AM
  2. Finding users on a network and messaging them.
    By Necrodeemer in forum C++ Programming
    Replies: 3
    Last Post: 05-04-2003, 02:04 PM
  3. Windows ntfs perms
    By wp_x in forum Tech Board
    Replies: 3
    Last Post: 03-04-2003, 06:38 AM
  4. Accessing a Specific Text Line Inside CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2002, 08:12 PM