[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Sv: [CPROG] backup af en array?



Søren H. Sørensen <sslug@sslug> skrev i en
nyhedsmeddelelse:sslug@sslug
>
>
> "Thomas M." wrote:
> >
> > Hejsa
> >
> >  Jeg sidder her og undrer mig lidt. Har lavet følgende for at lave en
> > 'backup' af en array :
> > char lcd[40][64]; // global variable
> >
> > void manipulation();
> > {
> > char *lcdbackup;
> >
> >  lcdbackup = malloc(sizeof(lcd));
> >  memcpy (lcdbackup,lcd,sizeof(lcd));
> >
> >  ... kode der manipulerer med lcd.
> >
> >  memcpy (lcd,lcdbackup,sizeof(lcd));
> >  free(lcdbackup);
> > }
> >
>
> Øhhh - mener du den programstump helt bogstaveligt???

 Øhhh - Ja? Hvad ellers? Nogen graverende fejl ??

> Jeg ville nok fjerne det ";" efter "void manipulation( void )", men du
> mener jo du
> faktisk roder i indholdet af din lcd-array senere. Ellers har JEG ingen
> gode forklaringer på fænomenet umiddelbart.

Ups, en lille typo. S'følig skal der ikke være ';' efter void manipulation()

Mvh Thomas





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *