string initialization

Massimiliano Cialdi cialdi@firenze.net
Wed Mar 24 13:21:00 GMT 2004


I want to initialize staticly a string like this:
"abc\0defg\0hi\0"

if I define:
char *str[] = {
"abc",
"defg",
"hi" };

can I be sure that the 3 strings are placed consecutively? 
In this way I declase an array of strings. There is another way to avoid
this?

thanks

-- 
Massimiliano Cialdi
cialdi@firenze.net
m.cialdi@oksys.it



More information about the Gcc-help mailing list