ccplusplus.com
Learn C, C++ Concepts
Friday, February 10, 2012
typedef c++
/************************************************************************* * File : typedef.cpp * Author : Saurabh Gupta * Desc : typedef c++ * Source : http://www.ccplusplus.com/p/c_15.html * Created : 11:55 AM Friday, February 10, 2012 *************************************************************************/ #include
#include
using namespace std; int main () { /* * create a string and explain its property */ typedef string ccplusplus; ccplusplus name = "www.ccplusplus.com"; ccplusplus owner = "Saurabh Gupta"; ccplusplus url = "http://www.ccplusplus.com"; ccplusplus desc = "Learn C C++ UNIX Linux Concepts"; cout << owner << " is the owner of the website " << name << "\nwhose url is " << url << "\nand its purpose is to " << desc << endl; return 0; } /* * OUTPUT * [sgupta@rhel6x86 typedef]$ c++ typedef.cpp -o typedef [sgupta@rhel6x86 typedef]$ ./typedef Saurabh Gupta is the owner of the website www.ccplusplus.com whose url is http://www.ccplusplus.com and its purpose is Learn C C++ UNIX Linux Concepts [sgupta@rhel6x86 typedef]$ */
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment