Docsity

C++ Namespace Concepts: Using Namespaces abc and xyz, Exercises of Object Oriented Programming

Partial preview of the text

Download C++ Namespace Concepts: Using Namespaces abc and xyz and more Exercises Object Oriented Programming in PDF only on Docsity!

C:\Documents and Settings\Administrator\My ...Studio 2010\Projects\namespace\namespace\namespace.h 1

include <^ stdio^.^ h^ >

namespace abc { int a; }

namespace xyz { float a; }

docsity.com

C:\Documents and Settings\Administrator\My ... 2010\Projects\namespace\namespace\namespace.cpp 1

#include #include "namespace.h"

//using namespace abc; //this will print integer in the output using namespace xyz; //this will print float in the output

void main() { a = 2. 221 ; //printf("%d", a); printf("%f", a); getch();

}

docsity.com