Click here to Skip to main content
15,893,904 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: migration from c++ 6 to Visual stutio professional 2010 Pin
Richard MacCutchan18-Mar-12 22:36
mveRichard MacCutchan18-Mar-12 22:36 
AnswerRe: migration from c++ 6 to Visual stutio professional 2010 Pin
Albert Holguin19-Mar-12 4:25
professionalAlbert Holguin19-Mar-12 4:25 
AnswerRe: migration from c++ 6 to Visual stutio professional 2010 Pin
MagicBishop19-Mar-12 8:24
professionalMagicBishop19-Mar-12 8:24 
GeneralRe: migration from c++ 6 to Visual stutio professional 2010 Pin
mrby12319-Mar-12 8:26
mrby12319-Mar-12 8:26 
GeneralRe: migration from c++ 6 to Visual stutio professional 2010 Pin
mrby12319-Mar-12 15:47
mrby12319-Mar-12 15:47 
AnswerRe: migration from c++ 6 to Visual stutio professional 2010 Pin
Albert Holguin19-Mar-12 16:18
professionalAlbert Holguin19-Mar-12 16:18 
GeneralRe: migration from c++ 6 to Visual stutio professional 2010 Pin
mrby12319-Mar-12 16:26
mrby12319-Mar-12 16:26 
QuestionFunction Overloading Pin
Amrit Agr18-Mar-12 5:46
Amrit Agr18-Mar-12 5:46 
Dear Developers,

Todays I found a surprsing fact on the scenario of functiona overlaoding in C++.

The code segment is here


#include <iostream>
using namespace std;

void display( char* );
void display( const char* );

void main()
{
char *ch1 = "Hello";
const char *ch2 = "Bye";

display(ch1);
display(ch2);
}

void display( char* p )
{
cout << p;
}

void display( const char* p )
{
cout << p;
}

As I know, In function overloading, the arguments must be differ in either in type or count. But its working. and one more surpring fact is that if I am remving pointers on that program. It says.. that function already have a body.

How is it possible????

Please guide me.

Thnaks.
Amrit Agrawal
Software Developer, Mumbai
AnswerRe: Function Overloading Pin
jschell18-Mar-12 7:19
jschell18-Mar-12 7:19 
AnswerRe: Function Overloading Pin
smags1319-Mar-12 9:25
smags1319-Mar-12 9:25 
QuestionProblem with drawing using GDI functions... Pin
Rozis18-Mar-12 0:52
Rozis18-Mar-12 0:52 
AnswerRe: Problem with drawing using GDI functions... Pin
Albert Holguin18-Mar-12 17:09
professionalAlbert Holguin18-Mar-12 17:09 
QuestionSecure erase command implementation Pin
K4HVDs18-Mar-12 0:19
K4HVDs18-Mar-12 0:19 
AnswerRe: Secure erase command implementation Pin
jschell18-Mar-12 7:23
jschell18-Mar-12 7:23 
AnswerRe: Secure erase command implementation Pin
Albert Holguin18-Mar-12 17:28
professionalAlbert Holguin18-Mar-12 17:28 
QuestionMultiple threads in MFC Pin
K4HVDs18-Mar-12 0:15
K4HVDs18-Mar-12 0:15 
AnswerRe: Multiple threads in MFC Pin
Jochen Arndt18-Mar-12 1:23
professionalJochen Arndt18-Mar-12 1:23 
AnswerRe: Multiple threads in MFC Pin
Rajesh R Subramanian18-Mar-12 2:47
professionalRajesh R Subramanian18-Mar-12 2:47 
AnswerRe: Multiple threads in MFC Pin
Albert Holguin18-Mar-12 17:13
professionalAlbert Holguin18-Mar-12 17:13 
QuestionLittle advice of CFront Pin
Brandon-X1200017-Mar-12 17:13
Brandon-X1200017-Mar-12 17:13 
AnswerRe: Little advice of CFront Pin
Richard MacCutchan17-Mar-12 22:07
mveRichard MacCutchan17-Mar-12 22:07 
GeneralRe: Little advice of CFront Pin
Brandon-X1200017-Mar-12 23:22
Brandon-X1200017-Mar-12 23:22 
GeneralRe: Little advice of CFront Pin
Richard MacCutchan18-Mar-12 2:14
mveRichard MacCutchan18-Mar-12 2:14 
GeneralRe: Little advice of CFront Pin
Brandon-X1200018-Mar-12 6:39
Brandon-X1200018-Mar-12 6:39 
GeneralRe: Little advice of CFront Pin
Richard MacCutchan18-Mar-12 22:31
mveRichard MacCutchan18-Mar-12 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.