void-pointers
Porting Issue: Pointer with offset in VC++
Ok, this compiles fine in GCC under Linux. char * _v3_get_msg_string(void *offset, uint16_t *len) {/*{{{*/[详细]
2023-01-16 18:22 分类:问答Generic editable functions in C using void*
I fall in some problem. I need to write some function like memcpy(void*, const void*), which its signature should be:[详细]
2023-01-16 06:03 分类:问答Interesting problem on pointers..Please help
#include<iostream> #include<conio.h> using namespace std; int main() { int x = 65; int *ptr = &x;[详细]
2023-01-14 19:43 分类:问答Casting void pointers
I\'ve seen a lot of the following in older C code: type_t *x = (type_t *) malloc(...); What\'s the point of casting the pointer returned from malloc() since it\'s void *? Is it because older C co开[详细]
2023-01-12 18:36 分类:问答Pointer arithmetic for void pointer in C
When a pointer to a particular type (say int, char, float, ..) is incremented, its value is increased by the size of that data type. If a void pointer which points to data of size x is incremented, ho[详细]
2023-01-12 12:16 分类:问答What's the best way to make a bitwise function work for any type of integer input c++?
So I need to read flags in bits and set flags in bits. These bits are in various sizes of integer: int16, int32, int64, etc.[详细]
2023-01-07 05:35 分类:问答What does the expression "BIO *client = (BIO *)arg" mean?
Here is the context of the code: void THREAD_CC server_thread(void *arg) { BIO *client = (BIO *)arg; ..开发者_如何学C.[详细]
2023-01-07 03:29 分类:问答Converting a void* to a std::string
After perusing the web and messing around myself, I can\'t seem to convert a void*\'s target (which is a string) to a std::string. I\'ve tried using sprintf(buffer, \"%p\", *((int *)point)); as recomm[详细]
2023-01-03 21:11 分类:问答How to get rid of void-pointers
I inherited a big application that was originally written in C (but in the mean time a lot of C++ was also added to it).Because of historical reasons, the application contains a lot of void-pointers.B[详细]
2023-01-03 17:40 分类:问答Issue with dynamic array Queue data structure with void pointer
Maybe there\'s no way to solve this the way I\'d like it but I don\'t know everything so I better ask...[详细]
2022-12-27 01:32 分类:问答