[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] DOUBT
From: Amey Patil <amey.patil () sjsu ! edu>
Date: 2014-07-23 19:38:11
Message-ID: CADJ8CoOUQxVN2eQMLxVR+p8Rojq5n=rLcMWRGtVwCYP2wyA0tQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
Following are function in my c++ class named "Word":
void Word::set_name(const char *a){
name = a;
}
const char* Word::get_name(){
return name;
}
When I call them through Python in terminal by;
import word
w = word.Word()
w.set_name("Amey")
w.get_name()
till w.set_name() it works fine.
It won't print "Amey" after executing w.get_name(), all it prints is;
' '
Please help me understand what went wrong..
Thanks in advance..
Sincere Regards,
Amey Patil
[Attachment #5 (text/html)]
<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>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic