[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]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
On Tue, 14 Jan 2003 sslug@sslug wrote: > Hvordan kan jeg convertere enkelte char i et char-array til integers > (0 eller 1)? #include <stdio.h> void insert_int(int i) { printf("Bit: %d\n", i); } int main(void) { char *s = "01100"; while (*s) insert_int(*s++ % 2); return 0; } > -Eller kan man erklære et bit-array i c? struct test { unsigned bit0_0 : 1; /* fylder 1 bit */ unsigned bit1_3 : 3; /* fylder 3 bit */ } men den kan du vist ikke bruge til noget. mvh/hans -- Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079 Schou Industries ApS http://schou.dk/ CVR: 26 13 44 39 -------------------------------------------------------------- In Linux® we have found a UNIX® that is a better answer. We think Linux® is the new UNIX®. -- Michael Dell
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |