Skip to content

vector<byte> support? #675

@jjqcat

Description

@jjqcat

我想将一个结构体数据,通过byte数组传递,远程端手动再转换成我的结构体数据,有什么办法吗?是否可以通过vector进行转换,如
struct custom
{
int a;
char c;
double d
};
vector vecData;
vecData.resize(sizeof(struct custom));

struct custom data;
memcpy(vecData.data, &data,sizeof(struct custom));

RPC 函数调用时传递 vecData

谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions