copying structs
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: copying structs

  1. #1
    Join Date
    Jul 2009
    Posts
    4

    copying structs

    hello,

    If I have a structure like this:

    extern struct mystruct {

    int[100] myarray;
    char[50] chararray;

    }

    how can I make another structure exactly the same, with all the same values in the arrays?

    thanks a lot

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: copying structs

    I'm not sure what you're hoping to accomplish with the extern keyword there, but that struct's auto-defined operator= should do the job well enough.

  3. #3
    Join Date
    Jul 2009
    Posts
    4

    Re: copying structs

    I am accessing FORTRAN code with the extern reference. Okay I will assume a simple '=' does the job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center