how does extern "C" allow C++ code in a C file? -


in order use c++ code in c file, read can extern "c" { (where c++ code goes here)}, when try printing out using cout, keep getting error because not recognize library . think confused on how extern "c" allows use c++ code in c.

the opposite true. can use extern c add code want compile c code using c++ compiler.

unless i'm missing can't compile c++ code c compiler.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -