I will give you an example of one function, that could be "treated" as C or C++. std::toupper()
can also be written as toupper()
. I believe the first one uses some safety checks of C++, while the other one is strictly C
. But what it boils down to is:
#include <cctype>
#include <iostream>
int main (void) {
char c = 'b';
std::cout << toupper(c);
return 0;
}
compiles using C way, while:
#include <cctype>
#include <iostream>
int main (void) {
char c = 'b';
std::cout << std::toupper(c);
return 0;
}
Uses C++ compilation addressing namespaces, ant that is what @numzero's answer talks about.
Now both will compile, but it is up to you and your own risk to use C
function.