devxlogo

Namespaces and the C Standard Library

Namespaces and the C Standard Library

The C++ Standard requires that the C standard library be declared in namespace std, just as the C++ Standard Library. Thus, if you #include and call printf(), you should use a fully qualified name, a using-declaration, or a using-directive. For example:

 #include int main (){ std::printf (

devx-admin

Share the Post: