Gast
#2177513
Hallo zusammen,
ich benutze einen Atmega 8 und das AVRStudio4
Nun muss ich z.b 9993 * 123 rechnen...damit überschreite ich ja die
16bit vom unsigned int.
also deklariere ich meine Variable mit "unsigned long int"
leider kommen dabei nur brauchbare Ergebnisse bis 2^15 raus.
In der stint.h steht:
typedef unsigned long int uint32_t;
/** \ingroup avr_stdint
64-bit signed type.
\note This type is not available when the compiler
option -mint8 is in effect. */
Jetzt hab ich Folgendes in mein Programm geschrieben
#if __USING_MINT8
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
#else /* !__USING_MINT8 */
/** \ingroup avr_stdint
largest signed int available. */
typedef int64_t intmax_t;
/** \ingroup avr_stdint
largest unsigned int available. */
typedef uint64_t uintmax_t;
#endif /* __USING_MINT8 */
aber leider bringt das auch nicht...
was mache ich falsch?