How to print this kind of result with arrow operator

May 6, 2013 at 2:19pm
pscobject->add_v3_signal($1, tmp);

May I know how can i print the result perform by this code?After go thru this code i want to print what is the result will be returned.How can I write the print out way.

If in c:
How can I use printf to print it

If in c++:
how to use cout to print it?
May 6, 2013 at 2:21pm
What is the type of the result?
May 6, 2013 at 2:25pm
EXTERN _pscmain* pscobject; pscobject = new _pscmain;


I found these two line.But i duno how can i know what is type?
May 6, 2013 at 2:37pm
What is the type of expression pscobject->add_v3_signal($1, tmp);
that you are going to print?
May 6, 2013 at 2:41pm
Hi vlad

The return value from the subroutine add_v3_signal($1,tmp) will be
return (_V3Signals[_num_v3_signals - 1])

from my reply above the type you mean is not pscobject = new _pscmain; which mean hv dynamic memory that point to _pscmain type.Do correct me if i am wrong.
May 6, 2013 at 11:27pm
Can teach me how to print ?
May 7, 2013 at 1:44am
May 7, 2013 at 3:36am
you need the return type of _pscmain, or, rather, what type is (_V3Signals[_num_v3_signals - 1])
May 7, 2013 at 5:27am
hi hansaaa

_v3signal **_V3Signals;



does the bold words consider as type of _V3Signals?
May 7, 2013 at 6:21am
well, it seems to be an instance(or, rather, a pointer) of a _v3signal, whatever that is? Do you know what it is and how to print it?

What are you expecting as a sample output of this?
Last edited on May 7, 2013 at 6:22am
May 7, 2013 at 6:27am
I duno how to print it.I just dunwan to print the address store in _V3Signals.I want the content pointed by _V3Signals.How can I print it?seriously i duno what is the content will be either integer or string.
May 7, 2013 at 7:39am
well if you don't really know what it is, how can you print it. where did you get it from?
May 7, 2013 at 7:47am
I am new hire.Company want me to understand codes.
if for simple code like
int *ptr char *pptr
i know we can use printf("%d,%s",ptr,pptr)


but when come to _v3signal **_V3Signals; the type in a class alrready.How can I know what is the content to keep inside.
May 7, 2013 at 7:55am
I think you need to learn more about programming before knowing how to do this...
May 7, 2013 at 7:56am
Yup.thats the only way :(
May 7, 2013 at 7:58am
do you know object-orientation (object-oriented programming/modeling). that could help here.
May 7, 2013 at 8:05am
Ya I know.But mostly the basic one.Will put more effort to learn.Thx
Topic archived. No new replies allowed.