<div>Hi all,</div>  <div>&nbsp;</div>  <div>Sorry for sending basic questions,..may be u guys see I am doing progress in CORBA with c++. Ok my question is,... </div>  <div>&nbsp;</div>  <div>I want to change lenght of <FONT color=#0000ff>CORB::String_var</FONT> <STRONG>data</STRONG> variable&nbsp;in a loop and set new const string to my <STRONG>data</STRONG> variable.&nbsp;</div>  <div>&nbsp;</div>  <div>What I did was in the below.</div>  <div>&nbsp;</div>  <div><STRONG>My IDL</STRONG>&nbsp; </div>  <div>&nbsp;</div>  <div>interface stringTestServer {<BR>&nbsp;void setSize(inout short size);<BR>&nbsp;string returnType();</div>  <div>};</div>  <div>&nbsp;</div>  <div><STRONG>Server code:</STRONG></div>  <div>data = ( char*) "<FONT color=#ff4040>A</FONT>";</div>  <div>&nbsp;</div>  <div>void stringTestServer_i::setSize(CORBA::Short&amp; size)<BR>{<BR>&nbsp;const char *str ="";<BR>&nbsp;std::string s ="";<BR>&nbsp;<BR>&nbsp;for(int
 i=0;i&lt;size;i++)<BR>&nbsp;{<BR>&nbsp;&nbsp;s+="a";<BR>&nbsp;}<BR>&nbsp;str = s.c_str();<BR>&nbsp;cout&lt;&lt;"Str="&lt;&lt;str&lt;&lt;endl;&nbsp; str varaible changes as loop<BR>&nbsp;<BR>&nbsp;data = CORBA::string_dup(str); --&gt; <FONT color=#ff0000><STRONG>Here is the problem data always prints A</STRONG></FONT><BR>&nbsp;cout&lt;&lt;"Data="&lt;&lt;*data&lt;&lt;endl;<BR>}</div>  <div>&nbsp;</div>  <div>char* stringTestServer_i::returnType()<BR>{<BR>&nbsp;return CORBA::string_dup(data);<BR>}&nbsp;</div>  <div>&nbsp;</div>  <div>I hope I made myself understand, basically I want to change lenght of data and set new string each time. </div>  <div>&nbsp;</div>  <div>&nbsp;</div><BR><BR><div><FONT color=#00007f></FONT>&nbsp;</div>  <div><FONT color=#00007f>==================================================================================================================================================================</FONT></div>  <div><FONT color=#00007f>Janarbek,
 Researcher. <BR>Software Robot Research Team, ETRI(Electronics and Telecommunications Research Institute)<BR>161 Kajong-Dong, Yusong-Gu, TAEJON, 305-350, KOREA<BR>Email : </FONT><A href="mailto:janarbek@etri.re.kr"><FONT color=#00007f>janarbek@etri.re.kr</FONT></A><BR><FONT color=#00007f>Phone : 82-42-860-1838<BR>Fax : 82-42-860-6790</FONT></div>  <div><FONT color=#00007f>Cell Phone: 82-10-8692-8103</FONT></div>  <div><FONT color=#00007f>===================================================================================================================================================================</FONT></div><p>&#32;
      <hr size=1>Looking for a deal? <a href="http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20-">Find great prices on flights and hotels</a> with Yahoo! FareChase.