Current area: HOME ->

Zip File view

Some Introductory C++ Code Examples


This page allows you to view the contents of a file contained inside a ZIP archive available at Programmer's Heaven. This means you can view the code and find what you need from it without having to download the ZIP file first. If the file contains source code for a language we recognize, we have syntax highlighted it.

Filename displayed: #8.CPP
Found in file: BEGINCPP.ZIP

Download: Decimal to binary number It takes decimal number as input from user and converts it to  binary number.
// SRO.CXX  demonstrates the use of Scope Resolution Operator ::

#include <stream.hxx>

void proc1(), proc2();

int i = 1;      //global variable


main()
{
        proc1();
        proc2();
}

void proc1()
{
        char c;

        class X {
                char c;
                class Y {
                        char d;
                        void foo (char e) { d = e; }
                };
                char goo (X *q) { return q->c; }
        };
}

void proc2()
{
        int i = 2;      //local variable

        {
                int n = i;      //the i is the local i
                int i = 3;      //hides the global and local i

                cout << "i = " << i << "\n";        //prints out  i = 3
                cout << "::i = " << ::i << "\n";        //prints out  ::i = 1
                cout << "n = " << n << "\n";        //prints out  n = 2

        }
        cout << "i = " << i << "\n";            //prints out  i = 2
        cout << "::i = " << ::i << "\n";                //prints out  ::i = 1
}

/* output:

i = 3
::i = 1
n = 2
i = 2
::i = 1

*/


What happens when music meets the brain?

BF to optimized x86 assembly converter. v2.0
An improved version of my old BF to assembly converter, this one reduces the .asm file size by usually 50%, and makes the code generated much easier to understand. With C sourcecode.
Decimal to binary number
It takes decimal number as input from user and converts it to binary number.
Download What happens when music meets the brain? Download BF to optimized x86 assembly converter. v2.0 An improved version of my old BF to assembly converter, this  one reduces the .asm file size by usually 50%, and makes the  code generated much easier to understand. With C sourcecode. Download Decimal to binary number It takes decimal number as input from user and converts it to  binary number.







Sponsored links

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Localize software in three simple steps
Localize .Net, C/C++ & Delphi apps visually. HTML, HTML Help, XML & databases. Try Sisulizer now!
Delphi Localization Tool Sisulizer (WYSIWYG)
Create multilingual Delphi apps in three simple steps. Localize XML, HTML Help ... Try Sisulizer now
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.


Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.