Hi all,
I am writing a function to copy one struct(called instruction) to another
But when I call copy_struct(instruction1,instruction2) it is not getting copied. Do I have to declare it as pointers or something in the fuction? Please help me fix the problem.Code:void copy_struct(instruction src,instruction dest) { dest.inst_addr = src.inst_addr; dest.inst_func = src.inst_func ; dest.inst_destreg = src.inst_destreg; dest.src1 = src.src1; dest.src2 = src.src2; } copy_struct(instruction1,instruction2)



LinkBack URL
About LinkBacks


