The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-22-2008
marconi marconi is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 41
Regarding cuserid() function in 'C'

Hi,

I am doing a (Make gapw), where I have the following line of code at Line No.96 :-

96 DISCARD strcpy(user , (char*) cuserid((char*)0));

But I am not able to compile due to the only 1 following error :-

gapw.c: In function `main':
gapw.c:96: warning: cast to pointer from integer of different size

I included #include <stdlib.h> and #include <libgen.h>, in the file, but still I am not able to compile.

I think, there is a problem with the usage of cuserid() function.

Request you to please help me to debug the error.

Thanks in advance.

Best Regards,
Marconi

Last edited by marconi; 07-22-2008 at 04:59 PM..