So these are the three files. I executed C.cc, no error is there but nothing gets printed either... It's suppose to print the value of x.
What's wrong in this code, please help!
when you have header and source file , make sure to respect the modularity . Declare in header , define in source file . Never using namespace in header . Also #include <iostream> goes in the source file .