<div dir="ltr"><div><div><div><div><div><div>Hi, <br><br></div>Following are function in my c++ class named "Word":<br><br><span style="color:rgb(255,0,0)">void Word::set_name(const char *a){<br> name = a;<br>
}<br><br>const char* Word::get_name(){<br> return name;<br>}</span><br><br></div>When I call them through Python in terminal by;<br><br></div><span style="color:rgb(255,0,0)">import word<br></span></div><span style="color:rgb(255,0,0)">w = word.Word()<br>
</span></div><div><span style="color:rgb(255,0,0)">w.set_name("Amey")<br></span></div><span style="color:rgb(255,0,0)">w.get_name()</span><br><br>till w.set_name() it works fine. <br>It won't print "Amey" after executing w.get_name(), all it prints is; <br>
<br><span style="color:rgb(255,0,0)">' '</span><br><br></div><div>Please help me understand what went wrong..<br><br></div><div>Thanks in advance..<br><br></div><div>Sincere Regards,<br></div><div>Amey Patil<br></div>
</div>