User Setup & File Operations...

Adarsh Kochhar adarsh@metaphorm.com
Sat Jan 17 11:00:00 GMT 1998


HI!
    I am a new entrant into the user group of gnu-win32 apps..So,pls bear
with my very basic quaestions & do answer them..

Q1: I have bash running in NT machine.How do I create a /etc/passwd &
/etc/group files.I already have some users on the machine.Can I keep the
same userids, or I need to create new ones??

Q2: Once the users are created, what will be the login procedure ?I dont see
any login.exe .

Q3: I guess I can set the environment variables using the control panel "
system" for each of the users once I am able to get /etc/passwd in place.
Am i right?

Q4: I have the basic setup running , without ofcourse a .batchrc file..
      Now, I am trying to compile & execute a simple code using file
operations, but I get some un-comprehendable run-time errors.Following is
the listing of my code:
=====================================
#include<stdio.h>
void main()
{
  FILE *fptr=NULL;
        printf("Hi World! - This is Adarsh\n");
  system("date");
  fopen("Adarsh","w");
  fprintf(fptr,"HI THERE!!");
  fflush(fptr);
  fclose(fptr);
}
=====================================
I have noticed that it does create a zero byte file in the name of "Adarsh"
, but gives an exception after that I guess.Also the same piece of code
gives a warning, as if I am trying to declare the function "system()" inside
the function "main()".Why does this happen.Is there a header file to be
included?
    Also is there a header file to be included for the file operations??Are
all file operations supported.Where can I find help on that??

That's all for the moment.
Hope u will help me out.

-Adarsh Kochhar
adarsh@metaphorm.com


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list