Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Winsock - FD_WRITE Pin
David Crow21-Jun-16 8:12
David Crow21-Jun-16 8:12 
GeneralRe: Winsock - FD_WRITE Pin
Vijjuuu.21-Jun-16 8:21
Vijjuuu.21-Jun-16 8:21 
GeneralRe: Winsock - FD_WRITE Pin
David Crow21-Jun-16 9:19
David Crow21-Jun-16 9:19 
AnswerRe: Winsock - FD_WRITE Pin
Member 1260667928-Jun-16 20:47
Member 1260667928-Jun-16 20:47 
QuestionDLL files from wmi Pin
Member 1253112919-Jun-16 22:10
Member 1253112919-Jun-16 22:10 
AnswerRe: DLL files from wmi Pin
Jochen Arndt19-Jun-16 22:30
professionalJochen Arndt19-Jun-16 22:30 
QuestionPrint class Members? Pin
bosfan16-Jun-16 5:29
bosfan16-Jun-16 5:29 
AnswerRe: Print class Members? Pin
Maximilien16-Jun-16 5:41
Maximilien16-Jun-16 5:41 
QuestionRe: Print class Members? Pin
David Crow16-Jun-16 6:12
David Crow16-Jun-16 6:12 
AnswerRe: Print class Members? Pin
bosfan5-Aug-16 4:24
bosfan5-Aug-16 4:24 
AnswerRe: Print class Members? Pin
David Crow5-Aug-16 4:27
David Crow5-Aug-16 4:27 
AnswerRe: Print class Members? Pin
CPallini17-Jun-16 0:22
mveCPallini17-Jun-16 0:22 
GeneralRe: Print class Members? Pin
bosfan5-Aug-16 4:25
bosfan5-Aug-16 4:25 
GeneralRe: Print class Members? Pin
CPallini7-Aug-16 20:42
mveCPallini7-Aug-16 20:42 
QuestionCan define a function with same name and signature? Pin
sandeep manzhi16-Jun-16 4:22
sandeep manzhi16-Jun-16 4:22 
QuestionRe: define a function Pin
David Crow16-Jun-16 4:26
David Crow16-Jun-16 4:26 
SuggestionRe: define a function Pin
Richard MacCutchan16-Jun-16 4:32
mveRichard MacCutchan16-Jun-16 4:32 
AnswerRe: Can define a function with same name and signature? Pin
leon de boer16-Jun-16 6:38
leon de boer16-Jun-16 6:38 
Yes you can but if you want to do it statically it has to be done via compiler directives and smart macros and it's used by embedded programmers in some specific situations. It is not something we encourage to use like the C++ feature but there are times it is the only way to achieve what is needed.

It has been improved and is portable and easy if your compiler accepts the C11 standard word "_Generic".

Here is a reasonable link on it
Rob's Programming Blog: C11 - Generic Selections[^]

You can see the general form of the macro which provides the overloading
#define acos(X) _Generic((X), \
    long double complex: cacosl, \
    double complex: cacos, \
    float complex: cacosf, \
    long double: acosl, \
    float: acosf, \
    default: acos \
    )(X)

As the C community is still one of the larger programming languages the standard has been altered over time. In time order the main standards are C87, C90, C99, C11. Microsoft and Visual Studio has been one of the slowest compilers to include the new standards. Visual studio 2013 was the first version to cover most of C99 but it has been available in GCC and many micro-controller C compilers for many years.
In vino veritas


modified 16-Jun-16 12:55pm.

GeneralRe: Can define a function with same name and signature? Pin
CPallini17-Jun-16 0:23
mveCPallini17-Jun-16 0:23 
AnswerRe: Can define a function with same name and signature? Pin
Bram van Kampen26-Jun-16 12:33
Bram van Kampen26-Jun-16 12:33 
Questionenum Datatype: Overloaded function differ only by return type error...? Pin
mbatra3115-Jun-16 20:51
mbatra3115-Jun-16 20:51 
AnswerRe: enum Datatype: Overloaded function differ only by return type error...? Pin
Richard MacCutchan15-Jun-16 21:46
mveRichard MacCutchan15-Jun-16 21:46 
AnswerRe: enum Datatype: Overloaded function differ only by return type error...? Pin
leon de boer15-Jun-16 22:41
leon de boer15-Jun-16 22:41 
QuestionSHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Member 1248511614-Jun-16 2:39
Member 1248511614-Jun-16 2:39 
QuestionRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
David Crow14-Jun-16 2:43
David Crow14-Jun-16 2:43 

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.