what is void pointer?
I am unable to understand, please help me
geeksforgeek
0
Newbie Poster
Recommended Answers
Jump to PostThink of a void pointer as a dimensionless pointer. It has to be cast to a data type with a dimension before it can be referenced...Like below.
int x = 5; void *vptr = (void*)&x; int *iptr = (int*)vptr; fprintf(stdout, "*iptr->%d\n", *iptr);
All 5 Replies
cse.avinash
-1
Junior Poster
geeksforgeek
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
cse.avinash
-1
Junior Poster
geeksforgeek
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.