+
1 9 9

: C++

  1. #1
    Echolot       Echolot
    07.01.2007
    nsk-ats3510
    177
    ()
    0
    : 0 (: 0).

     C++

    , ??

    :
    :
    #include<stdio.h>
    
      struct xx
        {
        char a;
        int b;
        };
    struct xx *tmp;
    struct xx  temp;
    
    void main()
     {
    
      temp.a='a';
      temp.b=10;
    
         tmp=&temp;
         //    :
         temp=tmp
         //?
    
    }
    Echolot; 19.05.2007 19:11.

  2. #2
    andryv       andryv
    02.11.2006
    188
    ()
    0
    : 0 (: 0).

    ++ , , . , .

    be smile .... always

  3. #3
    rassk       rassk
    16.01.2007
    Nsk
    26
    ()
    0
    : 0 (: 0).

    Thumbs down

    andryv .

    :
        tmp=&temp;
         temp=*tmp
    . struct xx.
    tmp temp. -, . . - '=' .

  4. #4
    Echolot       Echolot
    07.01.2007
    nsk-ats3510
    177
    ()
    0
    : 0 (: 0).

    , ? -?

  5. #5
    rassk       rassk
    16.01.2007
    Nsk
    26
    ()
    0
    : 0 (: 0).

    Echolot
    , ? -?
    ? , .

  6. #6
    Echolot       Echolot
    07.01.2007
    nsk-ats3510
    177
    ()
    0
    : 0 (: 0).

    tmp .. temp ... temp tmp :tmp=&temp;. tmp temp??? (

  7. #7
    rassk       rassk
    16.01.2007
    Nsk
    26
    ()
    0
    : 0 (: 0).

    Echolot
    tmp .. temp ... temp tmp :tmp=&temp;. tmp temp??? (
    . .
    temp - xx. , " - ". temp , == struct xx - . .( ) (. ). - temp . temp ( ) . , - " ". , , '='. , , - . , '=' " " . , , .. - - . '='.
    '&' - .. "&temp" "temp"
    new

    struct xx xx. ( sizeof() )
    : - . '*', .. "*tmp" "tmp". '=' . .

    . - temp = *tmp; // tmp "" temp.
    - tmp = &temp ; // temp tmp.
    rassk; 20.05.2007 17:04.

  8. #8
    Nairo       Nairo
    03.11.2006
    503
    ()
    0
    : 0 (: 0).

    :
    NAME
           memcpy - copy memory area
    
    SYNOPSIS
           #include <string.h>
    
           void *memcpy(void *dest, const void *src, size_t n);
    
    DESCRIPTION
           The memcpy() function copies n bytes from memory area src to memory area dest.  The memory areas should not overlap.  Use memmove(3) if the memory areas do overlap.
    struct xx *a;
    struct xx b;
    memcpy(&b, a, sizeof(struct xx));
    Nairo; 20.05.2007 18:22.

  9. #9
    Echolot       Echolot
    07.01.2007
    nsk-ats3510
    177
    ()
    0
    : 0 (: 0).

    Nairo
    struct xx *a;
    struct xx b;
    memcpy(&b, a, sizeof(struct xx));
    !

    rassk )) , ..