c – initialization makes integer from pointer without a cast and 2 more compiler errors

c – initialization makes integer from pointer without a cast and 2 more compiler errors

You should do

int LEN = *args;

args is a pointer, *args is the value pointed by it. Also, you shouldnt put a u_char into an int.

For nthol: http://msdn.microsoft.com/en-us/library/windows/desktop/ms740069(v=vs.85).aspx

You can use atoi() function to convert char* to int.

About the link error about pthread, try put -lpthread on your compile command

c – initialization makes integer from pointer without a cast and 2 more compiler errors

You pass a pointer

u_char *args

You try to assign it to an integer

int LEN = args;

The error message says this.

makes integer from pointer

The real question is what do you think args is? Just from looking, Id guess it holds some arguments, not the length of some arguments?

Leave a Reply

Your email address will not be published.