<div>Hi all,</div> <div> </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> </div> <div>I want to change lenght of <FONT color=#0000ff>CORB::String_var</FONT> <STRONG>data</STRONG> variable in a loop and set new const string to my <STRONG>data</STRONG> variable. </div> <div> </div> <div>What I did was in the below.</div> <div> </div> <div><STRONG>My IDL</STRONG> </div> <div> </div> <div>interface stringTestServer {<BR> void setSize(inout short size);<BR> string returnType();</div> <div>};</div> <div> </div> <div><STRONG>Server code:</STRONG></div> <div>data = ( char*) "<FONT color=#ff4040>A</FONT>";</div> <div> </div> <div>void stringTestServer_i::setSize(CORBA::Short& size)<BR>{<BR> const char *str ="";<BR> std::string s ="";<BR> <BR> for(int
i=0;i<size;i++)<BR> {<BR> s+="a";<BR> }<BR> str = s.c_str();<BR> cout<<"Str="<<str<<endl; str varaible changes as loop<BR> <BR> data = CORBA::string_dup(str); --> <FONT color=#ff0000><STRONG>Here is the problem data always prints A</STRONG></FONT><BR> cout<<"Data="<<*data<<endl;<BR>}</div> <div> </div> <div>char* stringTestServer_i::returnType()<BR>{<BR> return CORBA::string_dup(data);<BR>} </div> <div> </div> <div>I hope I made myself understand, basically I want to change lenght of data and set new string each time. </div> <div> </div> <div> </div><BR><BR><div><FONT color=#00007f></FONT> </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> 
<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.