C: jaký je rozdíl

Jaroslav Buchta jaroslav.buchta na hascomp.cz
Neděle Srpen 3 19:04:29 CEST 2014


unsigned je implicitne int ale nic nebrani tomu to explicitne napsat, 
jestli jde o tohle...

Dne 3. 8. 2014 12:56, Miroslav Draxal napsal(a):
>
> Dobrý den,
>
> Jaký je rozdíl, mezi těmito dekleracemi?
>
> typedef struct s_barva {
>
>     unsigned code : 7;
>
>     unsigned : 1;
>
>     unsigned R : 3;
>
>     unsigned G : 3;
>
>     unsigned B : 2;
>
> } _znak;
>
> A
>
> typedef struct s_barva {
>
>     unsigned int code : 7;
>
>     unsigned int : 1;
>
>     unsigned int R : 3;
>
>     unsigned int G : 3;
>
>     unsigned int B : 2;
>
> } _znak;
>
> Já si původně myslel, že ta druhá deklerace ani není platná.
>
> Díky za znalosti. Míra
>
>
>
> _______________________________________________
> HW-list mailing list  -  sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list

------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20140803/dab25ddd/attachment.html>


Další informace o konferenci Hw-list