How to print this kind of result with arrow operator

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?
What is the type of the result?
EXTERN _pscmain* pscobject; pscobject = new _pscmain;


I found these two line.But i duno how can i know what is type?
What is the type of expression pscobject->add_v3_signal($1, tmp);
that you are going to print?
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.
Can teach me how to print ?
you need the return type of _pscmain, or, rather, what type is (_V3Signals[_num_v3_signals - 1])
hi hansaaa

_v3signal **_V3Signals;



does the bold words consider as type of _V3Signals?
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
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.
well if you don't really know what it is, how can you print it. where did you get it from?
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.
I think you need to learn more about programming before knowing how to do this...
Yup.thats the only way :(
do you know object-orientation (object-oriented programming/modeling). that could help here.
Ya I know.But mostly the basic one.Will put more effort to learn.Thx
Topic archived. No new replies allowed.