Re: Copy a Structure

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Jochen,
var1=*var2 will copy the contents of structure pointed
to by var2 into var1. One more thing I wanted to ask was how do I copy the
contents of the structure var1 into the structure pointed to by var2?
var2=&var1 will make var2 point to the var1 struture.

thanks again,

"Jochen Kalmbach [MVP]" wrote:

> Hi Pravin!
>
> > in C, How do I copy a contents of a Structure pointer to a Structure
> > Variable. e.g
> > struct A var1;
> > struct A *Var2;
>
> var1 = *Var2;
>
> --
> Greetings
> Jochen
>
> My blog about Win32 and .NET
> http://blog.kalmbachnet.de/
>
.



Relevant Pages

  • Re: PASSING VARIABLES...
    ... input the values for var1 and var2: ... So once the user fills in the form and hits submit, ... Prev by Date: ...
    (php.general)
  • Copy a Structure
    ... How do I copy a contents of a Structure pointer to a Structure ... I want to copy contents of Structure pointed to by Var2 to a Structure var1. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vc)
  • Re: [PHP] string as file
    ... This is an example of $var1 and $var2. ... I think that neither you nor Greg understands what I'm looking for. ... Use regular expressions or straight string replacements - that's the best way to implement mail-merge type behaviour. ...
    (php.general)
  • Re: Newbie Question
    ... but I am not all that familiar with most of cobol. ... var2 pic 9 ... MOVE VAR2 TO VAR1 is executed, what is actually stored in var1. ... loop through it digit by digit, ...
    (comp.lang.cobol)
  • Re: Newbie Question
    ... var2 pic 9 ... MOVE VAR2 TO VAR1 is executed, what is actually stored in var1. ... loop through it digit by digit, ... Converting the string into a long might get you into problems though. ...
    (comp.lang.cobol)