Meaning of (void *)

Asked

Viewed 702 times

8

What is the meaning of calling a function with one that was int and is passed as (void *)?

If variable was declared as int because it is passed as a parameter to a function
*(void *)variavel* ?

Example

int var = 10;

teste((void *)var);

1 answer

11


The (void *) means that it is a pointer to a variable not specifying the type of the variable.

For example, one can have the same concept with (int *) where it is a pointer to a variable of type int, specifying the type.

Microsoft has a document explaining some of this in http://msdn.microsoft.com/en-us/library/y31yhkeb(v=vs.120). aspx

Browser other questions tagged

You are not signed in. Login or sign up in order to post.