RE: C: jaký je rozdíl

Miroslav Draxal evik na volny.cz
Neděle Srpen 3 20:20:13 CEST 2014


unsigned je implicitne int 

tak tuhle informaci jsem nenašel. Mě se zdálo, že to "dělá" to samé.

Díky. Míra

 

From: Hw-list [mailto:hw-list-bounces na list.hw.cz] On Behalf Of Jaroslav
Buchta
Sent: Sunday, August 03, 2014 7:04 PM
To: HW-news
Subject: Re: C: jaký je rozdíl

 

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/734453a9/attachment.html>


Další informace o konferenci Hw-list