Pointer to Class prb
From: Venkatesh (hvenkatesh_at_yahoo.com)
Date: 04/30/04
- Next message: Jeff Schwab: "Re: using template"
- Previous message: Bryan Olson: "Re: Cracking DES with C++ is faster than Java?"
- Next in thread: John Harrison: "Re: Pointer to Class prb"
- Reply: John Harrison: "Re: Pointer to Class prb"
- Reply: Jeff Schwab: "Re: Pointer to Class prb"
- Reply: Rob Williscroft: "Re: Pointer to Class prb"
- Reply: raj: "Re: Pointer to Class prb"
- Reply: Jerry Coffin: "Re: Pointer to Class prb"
- Reply: JKop: "Re: Pointer to Class prb"
- Reply: Bill Seurer: "Re: Pointer to Class prb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Apr 2004 03:57:13 -0700
Hi All,
I tried the following code and it seems to work. I am really confused as to
how this is possible. Can someone please throw some light?
#include<iostream>
using namespace std;
class Y
{
public :
void foo()
{
cout << "Hello World"<< endl;
}
};
main ()
{
Y *ptr = NULL;
ptr->foo();
}
Thanks in advance.
Venky
- Next message: Jeff Schwab: "Re: using template"
- Previous message: Bryan Olson: "Re: Cracking DES with C++ is faster than Java?"
- Next in thread: John Harrison: "Re: Pointer to Class prb"
- Reply: John Harrison: "Re: Pointer to Class prb"
- Reply: Jeff Schwab: "Re: Pointer to Class prb"
- Reply: Rob Williscroft: "Re: Pointer to Class prb"
- Reply: raj: "Re: Pointer to Class prb"
- Reply: Jerry Coffin: "Re: Pointer to Class prb"
- Reply: JKop: "Re: Pointer to Class prb"
- Reply: Bill Seurer: "Re: Pointer to Class prb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]