Reg virtual function and friend function

C

csudha

Hi all!
Please explain the usage of virtual function and friend function
with some examples.
Thanks,
Sudha.
 
M

Michael Mair

csudha said:
Hi all!
Please explain the usage of virtual function and friend function
with some examples.
Thanks,
Sudha.

We also do not have these in C.
Read the c.l.c++ FAQ or buy the book by Stroustrup.

-Michael
 
I

infobahn

csudha said:
Hi all!
Please explain the usage of virtual function and friend function

Both of these identifiers are in "user namespace", so you can make
them do whatever you like.
with some examples.

#include <stdio.h>

int virtual(void)
{
return printf("Hello, virtual reality.\n");
}

int friend(void)
{
return printf("Hello, friend.\n");
}

Or whatever. The world is your oyster.
 
M

Michael Mair

infobahn said:
Both of these identifiers are in "user namespace", so you can make
them do whatever you like.




#include <stdio.h>

int virtual(void)
{
return printf("Hello, virtual reality.\n");
}

int friend(void)
{
return printf("Hello, friend.\n");
}

Or whatever. The world is your oyster.

Splendid *g*


Cheers
Michael
 
C

CBFalconer

infobahn said:
Both of these identifiers are in "user namespace", so you can make
them do whatever you like.


#include <stdio.h>

int virtual(void)
{
return printf("Hello, virtual reality.\n");
}

int friend(void)
{
return printf("Hello, friend.\n");
}

Or whatever. The world is your oyster.

You are in a devious mood today. Unfortunately the reply doesn't
point out the error of his ways - ask C++ questions in a C++
newsgroup, not a C newsgroup.
 
I

infobahn

CBFalconer said:
You are in a devious mood today. Unfortunately the reply doesn't
point out the error of his ways - ask C++ questions in a C++
newsgroup, not a C newsgroup.

I remain to be convinced that they were C++ questions. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top