language-detection tag

1 questions


1 answers
142 views
0
I need a code to find out if I'm using the C++ compiler during runtime

Not using #ifdefCan you make a function that returns 0 when using C compiler and 1 when using C++ compiler?For example, int isCPP(){ return sizeof(char) == sizeof 'c';}//orint isCPP(){ typedef int T; ...


© 2024 OneMinuteCode. All rights reserved.