Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enumeration specifier
#1
My question is if there are one or more errors in this code?????????
Code:
/* file.h */
typedef enum tagColor {
  Rojo,
  Azul,
  Verde,
  Negro,
  Blanco
} Colors_t;

/* file.c */
#include \"file.h\"

void main (void)
{
  U32          u32value01;
  U32          u32value02;
  U16          u16value;
  Colors_t     enumcolor;

  u32value01 = Rojo;
  u32value02 = Blanco + Negro;

  u16value = 2U;

  enumcolor = u16value;

}
<t>Embedded System</t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)