"Hello, world!" program using a class for printing Please take a look at my program and let me know how I can improve it.

/*
"   To Print A Line On The Display Screen"
    Date:5th January 2011
    Programmer:Fahad
*/
#include &lt;iostream&gt;
using namespace std;
class Print
{
    public:
        void print_();
};
int main()
{
    Print Obj;
    Obj.print_();
    system( "pause" );
    return 0;
}
void Print::print_()
{
    cout &lt;&lt; "I am in print function and the program runs fine." &lt;&lt; endl;
}
In addition to the other comments, I would also use a different naming convention for types and objects.

For example, this looks unconventional.

Print Obj;
Obj.print_();


I prefer:

Print obj;
obj.print();


It's just a convention but being able to easily spot names that denote types helps if you start to use more complex expressions. For example:

Print().print();


Personally, I would also avoid system("pause"). You need to #include either &lt;stdlib.h&gt; or &lt;cstdlib&gt; to use it. Although the system call itself is standard C++ (from the standard C library), what you pass to it is system dependent.

In general I don't believe you should make your programs stop artificially. If they are designed to run in a terminal then the terminal user will be able to see the output even after the program exits.