..

FreePrograms


C programming Tutorial 

Free C Programs, C Programs Download


Embedded C lang & 8051(Embedded Products)


  CONTACT US   ABOUT US   PRIVACY  DISCLAIMER

FREE C PROGRAMS 

 C Tutorial for beginners
What is C C vs C++ vs Java Program Structure Data Types in C Basic Rules of C & C++
Functions in C If, Else Conditions Loops in C Switch Case Arrays
Pointers Structures in C Strings in C Command Line Arguments Type Casting
Linked Lists Recursion Binary Trees Inheritance Multiple Inheritance
Templates File I/O Object Oriented Programming  Data Structures in C C interview Questions

/*Namespace Std    C++/CPP Tutorial.*/

 
Namespaces allow us to combine entities like classes, objects and functions under a name.
It Introduces every name from the std namespace into the current scope block.

The keyword using (
using namespace std;) is used to introduce a name from a namespace into the current area. In this example, there are two global variables with the same name: x.
One is defined within the namespace first and the other one in second.

#include <iostream.h>
using namespace std;

namespace one
{
int x = 5;
}

namespace two
{
float x = 3.1416;
}

int main () {
cout << one::x << endl;
cout << two::x << endl;
return 0;
}

 

COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM