Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* ds_name = (char*)malloc(sizeof(char) * name_size);
- memcpy(ds_name, buffer, name_size);
- //strcpy(ds_name, (const char*)buffer);
- int* ds_argTypes = (int*)malloc(type_size);
- memcpy(ds_argTypes, (char*)buffer + name_size, type_size);
- std::cout << ds_argTypes[2] << std::endl;
- // works fine with strcpy but memcpy causes ds_argTypes to contain zeroes?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement