Hotnine
18-08-2001, 16:30
hi!
bin absoluter Neuling in C++(mach ne Ausbildung *freu).
Und nun wollte ich ein wenig rumspielen und wollte mit crypt() was machen, aber das klappt nicht!
Quellcode:<COde>
#include <iostream.h><BR>
#include <crypt.h><BR>
#define _XOPEN_SOURCE<BR>
#include <unistd.h><P>
int main()<BR>
{<P>
char Crypted;<BR>
Crypted = crypt("hallo");<P>
cout << Crypted << flush;<BR>
return 0;<BR>
}<P>
</CODE>
Fehlermeldung:<CODE><BR>
p2.cpp: In function `int main()':
/usr/include/crypt.h:33: too few arguments to function `char * crypt(const char *, const char *)'
p2.cpp:10: at this point in file
p2.cpp:10: assignment to `char' from `char *' lacks a cast
<P>
hoffe einer kann mir Helfen!
CU Till
bin absoluter Neuling in C++(mach ne Ausbildung *freu).
Und nun wollte ich ein wenig rumspielen und wollte mit crypt() was machen, aber das klappt nicht!
Quellcode:<COde>
#include <iostream.h><BR>
#include <crypt.h><BR>
#define _XOPEN_SOURCE<BR>
#include <unistd.h><P>
int main()<BR>
{<P>
char Crypted;<BR>
Crypted = crypt("hallo");<P>
cout << Crypted << flush;<BR>
return 0;<BR>
}<P>
</CODE>
Fehlermeldung:<CODE><BR>
p2.cpp: In function `int main()':
/usr/include/crypt.h:33: too few arguments to function `char * crypt(const char *, const char *)'
p2.cpp:10: at this point in file
p2.cpp:10: assignment to `char' from `char *' lacks a cast
<P>
hoffe einer kann mir Helfen!
CU Till