Re: [cc65] sizeof("string") gives wrong results

Date view Thread view Subject view

From: Spiro Trikaliotis (Trik-news_at_gmx.de)
Date: 2002-05-16 17:38:18


Hello,

"Christian Groessler" <cpg_at_aladdin.de> wrote:

> the following program returns 3 as sizeof the string. It should return
> 4 (count the terminating 0 byte).

no, this is correct ANSI C. If you want to count the terminating NULL
byte, you have to add one.

Gruß,
   Spiro.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-05-16 17:38:21 CEST