[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
 

backup af en array?



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);
}

 Men af en eller anden grund ser det ud til at min lcd ikke bliver
genetableret efter at koden har rodet rundt i den...

 lcd representerer et grafisk lcd display, organiseret i x/y bytes. Og
funktionen skal vise noget temporært i displayet, hvorefter at lcd så skal
restores til det oprindelige indhold. 

Thomas Mørch
licensed ham, with callsign OZ2AFO. License category: CEPT-1

If God had intended man to smoke He would have set him on fire.



 
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] *