RE:Can not print strings

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Tue Aug 25 1998 - 12:55:00 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET