Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Copying a struct

CoderDude
2018-02-16
2018-02-22
  • CoderDude - 2018-02-16

    How to easiest copy the values of one struct to another of the same type? In C/C++ the assignment operator does this job but it seems this is not how it works in ST. Do I need to specify a specific copy function for each struct?

     
  • Anonymous - 2018-02-22

    Originally created by: scott_cunningham

    You basically need to perform a byte copy. See this post: https://forum.codesys.com/viewtopic.php?t=7671#p17493

     

Log in to post a comment.