RE:Can not print strings

Masaharu Goto (MXJ02154@nifty.ne.jp)
Tue, 25 Aug 1998 19:55:00 +0900


Xie,

>Running the following simple code in ROOT can not give expected result.
>It'll only print a sigle character. Can you tell me what's wrong and how
>I can print the whole string ?
>
>root [24] Text_t aai[10]={"xiewei"};
>root [25] printf("%s\n",aa);

The problem is in initialization. It has to as follows.

root[24] Text_t aai[10]="xiewei";
root[25] printf("%s\n",aai);

Masaharu Goto