小编God*_*laQ的帖子

C++没有指针的复制结构

我想将数据结构复制到另一个

struct times{
    QString name;
    double time1;
    double time2;
    double time3;
};

/..../

times *abc = new times[10];
times *abc2 = new times[10];
Run Code Online (Sandbox Code Playgroud)

如何在不复制指针的情况下将abc复制到abc2中?

c++ arrays structure

1
推荐指数
1
解决办法
499
查看次数

标签 统计

arrays ×1

c++ ×1

structure ×1