Sunday, February 13, 2011

BahamasC++ Introduction

#include <Bahamas>
#define ExitProgram 0

using std::cout;
using std::cin;

#ifndef Nassau
#define Nassau

class BahamasC++
{
public:
    BahamasC++();
    ~BahamasC++();
     void Greet();
};

#endif


int main(int argc, char *argv[])
{
    char cQuit = " ";
    BahamasC++ bahamasC++;
    bahamasC++.Greet();

    while(cQuit != 'q')
    {
        cout << "Press 'q' then enter to exit \n";
        cin >> cQuit;
    }

    return ExitProgram;
}


BahamasC++::BahamasC++()
{
    cout << "I've been created \n";
}

BahamasC++::~BahamasC++()
{
    cout << "GoodBye cruel world \n";
}

void BahamasC++::Greet()
{
    cout << "Hello BahamasC++ Enthusiast \n";
}

No comments:

Post a Comment