logo       

Re: C Language Help: msg#00199

gcc.help

Subject: Re: C Language Help

Hi John,

>1) Let's say I have typedef'd "Abcde" and "Fghij" to "unsigned int". How do I get the following code to produce a warning, if not an error, if I do not explicitly cast?

Answer to #1: use classes. Typedefs are simple aliases, they don't actually define a new type.

Alternative answer to #1: use Ada.

>2) How do I get the following code to produce a warning, if not an error, if I do not explicitly cast?

Answer to #2: use classes. Int, signed int, and unsigned int are implicitly converted. Sad, I know, I hate it too.

Alternative answer to #2: use Ada.

Sincerely,
--Eljay




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise