Hi,
> Junaid Iqbal [SMTP:[EMAIL PROTECTED]] asked:
> any idea what i m doing wrong?
>
> #include <stdio.h>
> #include <string.h>
> int main (void){
> char User[16], Pass[16];
> GetCookie(&User,&Pass);
> }
> int GetCookie(char **User, char **Pass){
> bzero(*User,15);
> bzero(*Pass,15);
> return(1);
> }
>
First, do declare the subroutine before you call it.
Either use a prototype, or put the function in the
source before main (). Second, you define main
as returning an int, but you don't return any.
Third, bzero only needs a char *:
#include <stdio.h>
#include <string.h>
int GetCookie(char *User, char *Pass){
bzero(User,15);
bzero(Pass,15);
return(1);
}
int main (void){
char User[16], Pass[16];
GetCookie(User,Pass);
return( 0 );
}
HTH,
Thomas