Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: I don't use printf enough

by pg (Canon)
on Oct 23, 2003 at 03:06 UTC ( #301467=note: print w/replies, xml ) Need Help??


in reply to Re: Re: I don't use printf enough
in thread I don't use printf enough

His c++ syntax is just fine, his obj can be understood as a pointer to an object:

#include <iostream.h> class aclass { public: int first_perfect_number(void); }; int aclass::first_perfect_number(void) { return 6; } int main() { aclass * ap = new aclass(); cout << "first perfect number is: " << ap->first_perfect_number() +<< endl; }

Replies are listed 'Best First'.
Re: Re: Re: Re: I don't use printf enough
by jryan (Vicar) on Oct 23, 2003 at 15:37 UTC

    Right, but why on earth would you assume a pointer to an object in this case? The original bit wasn't talking about a reference to a perl object, so I assumed it was a typo. Just because the syntax passes the compiler doesn't mean it is what he meant. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://301467]
help
Chatterbox?
[choroba]: I'm looking forward to stable nonexperimental signatures, but before they arrive, I'm ok with my ($self, $blah) = @_

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-11-24 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (349 votes). Check out past polls.

    Notices?