[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
 

C++ : Konvertere fra WORD / DWORD til char (eller noget)



Hejsa!

Jeg har et problem, som formentlig viser sig at være ganske banalt. Jeg tror
jeg har stirret mig blind på det...
Lad mig først lige starte med en tilståelse. Jeg er ved at lave et program
til Windows (ja, jeg ved det...). I C++. Jeg kender ikke andre grupper end
denne (bruger også linux sometimes :o), så jeg skriver her :

Problemet:

Jeg har en variabel "data" :
        unsigned char data[1024];

Jeg har også en række andre variable :
        unsigned long X1 = 0x0123;
        unsigned long X2 = 0x1876;
        unsigned long X3 = 0x9987;
        doubble unsigned long X4 = 0x12348765;

X1 til X4 skal lægges ind i rækkefølge i "data". Altså således at man kan
pille dem ud af "data" igen uden at de ændres.

Er der en smart måde at gøre det på eller hvordan? Jeg er selv helt tom for
idéer, så ethvert forslag er velkomment!

Mvh.
Thomas Rokamp





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