Click here to Skip to main content
Click here to Skip to main content

Why I Chose C++

By , 20 Mar 2000
 

Introduction

A good way to get into an argument with a computer programmer is to attempt to explain why the language they are using is not as good as the one you are using. Most of the programmers I know are positively religious over their Operating System (see my other article), their development language and finally their text editor.

As you might have inferred by the title, I feel that C++ is the superior computer programming language. I will begin by qualifying that statement somewhat. I learned to program using Pascal and I still feel that it is a good language for learning computer programming. Pascal is type safe, has a very limited number of keywords and encourages good programming principles. The BASIC language in the form of Visual Basic on the other hand is an ideal language for quickly putting together a project, and for taking advantage of data base access and other advanced programming tools such as Microsoft's Component Object Model (COM).

Why is it then that modern operating systems and very large applications are written in C++? Visual Basic and Pascal (in the form of Delphi) barely resemble the ANSI definition of these languages. Each of these languages are proprietary and lock you in to a particular vendor. This does not particularly bother me, since I program exclusively for the Windows environment and use Microsoft's Visual C++ as my development environment. There are other features of C++ that are attractive when doing medium to large scale development:

  • Operator overloading (also in Delphi)
  • Exceptions (also in Delphi and Java)
  • Templates

These are the primary features of C++ that set it apart from its peers. I am not going to mention Object Oriented Programming (OOP) here because Java, VB and Delphi support OOP in some form or fashion. I would place OOP above the other three bullets if I were including it in this discussion.

Operator Overloading

I am sure that many of my C++ peers would disagree with me about the relative importance of the three features that I have selected. Operator overloading is essential to making a library of code "fool proof". First, let's look at a typical example of operator overloading:

class CVeryLong 
  {
  public:
      // default contructor inits member variables to zero
      CVeryLong(){ m_lHigh = m_lLow = 0; } 
      // initialization constructor sets member variables to a value
      CVeryLong( long lHigh, long lLow ){ m_lHigh = lHigh; m_lLow = lLow; } 
      virtual ~CVeryLong(){}; // destructor
      void SetHighValue( long lValue ){ m_lHigh = lValue; }
      long GetHighValue(){ return m_lHigh; }
      void SetLowValue( long lValue ){ m_lLow = lValue; }
      long GetLowValue(){ return m_lLow; }
      BOOL operator < ( CVeryLong& refValue )    // less than operator
      {
          if ( m_lHigh < refValue.GetHighValue()) return TRUE;
          else if ( m_lHigh > refValue.GetHighValue()) return FALSE;
          else if ( m_lLow < refValue.GetLowValue()) return TRUE;
          else return FALSE; // >=
      }
      BOOL operator > ( CVeryLong& refValue )    // greater than operator
      {
          if ( m_lHigh > refValue.GetHighValue()) return TRUE;
          else if ( m_lHigh < refValue.GetHighValue()) return FALSE;
          else if ( m_lLow > refValue.GetLowValue()) return TRUE;
          else return FALSE; // <=
      }
      BOOL operator == ( CVeryLong& refValue ) // equivalence operator
      {
          return m_lHigh == refValue.GetHighValue() 
                   && m_lLow == refValue.GetLowValue();
      }

  private:
      long m_lLow;
      long m_lHigh;
  };

The CVeryLong class keeps two private long variables to represent a single 64 bit integer. In this class, we are overloading the less than (<), greater than (>) and equivalence (==) operators to allow comparison of our new 64 bit integer class. This class is obviously not complete since I have not overloaded other key operators such as the arithmetic operators. Here is some sample code using our new class:

{
   CString csText;

   CVeryLong vl1( 1, 2 ), vl2( 1, 3 ), vl3;
   
   cout << "vl1 is (1, 2)" << endl;
   cout << "vl2 is (1, 3)" << endl;
   cout << "vl3 is (1, 2)" << endl;
       
   csText = "vl1 < vl2 is ";
   csText += vl1 < vl2 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;

   csText = "vl1 > vl2 is ";
   csText += vl1 > vl2 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;

   csText = "vl1 = = vl2 is ";
   csText += vl1 == vl2 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;

   csText = "vl1 < vl3 is ";
   csText += vl1 < vl3 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;

   csText = "vl1 > vl3 is ";
   csText += vl1 > vl3 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;

   csText = "vl1 = = vl3 is ";
   csText += vl1 == vl3 ? "true" : "false";
   cout << (LPCTSTR)csText << endl;
}

Running the program containing the above code, generates the following output:

       vl1 is (1, 2)
       vl2 is (1, 3)
       vl3 is (1, 2)
       vl1 < vl2 is true
       vl1 > vl2 is false
       vl1 == vl2 is false
       vl1 < vl3 is false
       vl1 > vl3 is false
       vl1 == vl3 is true

At this point, we have told the compiler what to do when it sees the >, < or == operators used with our class. We could have just as easily defined GreaterThan, LessThan and EqualTo member functions to do the same thing - and in other languages, this is exactly what you would have to do:

  vl1 == vl3 would be equivalent to vl1.EqualTo( vl3 )

So we have made the notation more concise and consistent with the intrinsic data types, but when we began this discussion, I stated that operator overloading would make the code "fool proof". Notice that in the middle of the sample usage code:

 vl3 = vl1;   // assign vl1 to vl3 and do the comparisons again

we did not overload the assignment operator, so C++ behaves like most languages when presented with this statement, and simply copies the member variables from one object to the other. What if our class were going to support n-level precision so that at compile time, we do not know how many longs to allocate? We would have to dynamically allocate the variables in the constructor and free them in the destructor. Our member variables might look like this:

private:
    short m_nValues; // number of values allocated
    long* m_pValues; // array of values

The default assignment operator will copy the member variables just as it did before, only now you have two pointers pointing to the same block of allocated memory. When the destructor for the first object runs, it will free the memory block with no problems, but when the second object's destructor runs, it tries to free the same block of memory - bug and crash. Even though you can write a Copy function to do the right thing, you cannot keep some unsuspecting programmer from coding the assignment that "works most of the time". Visual Basic is still "fool proof" at this point because it does not allow dynamic memory allocation, but Pascal (not Delphi) will let you crash and burn at this point.

In C++, the assignment operator would be written as follows:

CVeryVeryLong operator = ( CVeryVeryLong& refValue ) // assignment operator
{
   delete [] m_pValues; // free previous values
   m_nValues = refValue.GetNumberOfValues(); // needs to be defined
   m_pValues = new long[ m_nValues ]; // allocate new values
   
   // GetBuffer() in the following line needs to be defined
   // copy the array contents
   memcpy( m_pValue, refValue.GetBuffer(), sizeof(long) * m_nValues );
   return *this;
}

The conclusion here is that a language should either cripple itself as is the case with Java or VB (no dynamic memory allocation), or provide the programmer with a way of guaranteeing that users of your code cannot use it improperly.

Exceptions

Exceptions provide another capability that is hard to duplicate if not supported by the language. Windows NT provides a sophisticated capability called Structured Exception Handling (SEH) where the OS is providing the same type of functionality that is provided by C++. It may be possible to take advantage of SEH in other languages. C++ provides a portable mechanism that will work in all operating systems.

Exception handling is exactly what the name implies - the ability to handle exceptional cases without having to tax the normal case. Look at this example of exception processing:

DWORD dwStart = ::GetTickCount(); // used for timing in mSec
const int x = 1000000;
const int xEnd = -x;
int y = x;
int z;
while ( y > xEnd )
{
    try
    {
        while ( y > xEnd )
            z = x / y--; // divide protected by exception
    }
    catch (...)
    {
        cout << "Divide by zero" << endl; // trapped out of inner loop
        y--; // continue via outer loop
    }
}

DWORD dwStop = ::GetTickCount();
DWORD dwDiff = dwStop - dwStart;
CString csMessage;
csMessage.Format( "mSec = %d", dwDiff );
cout << (LPCTSTR)csMessage << endl;

The output from this code looks like this:

Divide by zero
mSec = 491

The inner loop is free to run without having to do a test for zero on every iteration - the divide by zero is handled as an exceptional case instead of having to treat is as the "rule". Here is how this condition could be handled without exceptions:

while ( y > xEnd )
{    
    if ( x != 0 ) // has to execute for every iteration
    {
        z = x / y--;
    }
    else
    {
        cout << "Attempted divide by zero" << endl;
    }
}

My work involves signal processing in real-time, where every millisecond counts. In the above example, the software could process 2 million integer divides without having to explicitly check for 2 million divide errors, by treating the divide by zero as an "exceptional case".

Templates

While templates may not be able to make your code "fool proof" as can overloaded operators, or faster and more robust by handling exceptions, they are my favorite C++ feature. Templates can save the programmer from having to write a lot of code and they benefit the final product by making it smaller.

Templates are type safe macros that are built on demand, that is whatever part of the template is not used is not included in the code. There are class templates and function templates.

Function Templates

With function templates, you can specify a set of functions that are based on the same code, but act on different types or classes. Here is an example of a function template that returns the maximum of two values:

template <class T> T& Max( T& a, T& b ) 
{
    if ( a >  b ) return a; else return b;
}

This is a data type independent way of comparing two floats, two ints, two shorts, two chars, etc., without having to write the MaxFloat, MaxInt, MaxShort, MaxChar, etc. Furthermore, if I only use the float in my current application, no code is generated for anything else. If I invoke Max with a float and a char, the compiler will complain. Here is an example use:

int n1 = 5, n2 = 10, n3;
float f1 = 5.1f, f2 = 10.5f, f3;
CVeryLong vl1( 1, 2 ), vl2( 2, 15 ), vl3; // remember CVeryLong?

n3 = Max( n1, n2 );
f3 = Max( f1, f2 );
vl3 = Max( vl1, vl2 );

CString csMessage;
csMessage.Format( "n3 = %d, f3 = %f, vl3 = (%d, %d)", 
                  n3, f3, vl3.GetHighValue(), vl3.GetLowValue() );
cout << (LPCTSTR)csMessage << endl;

The output generated is as follows:

n3 = 10, f3 = 10.500000, vl3 = (2, 15)

Notice that we are not limited to intrinsic types because of operator overloading. Since our CVeryLong class overloads the greater than (>) operator, it can be used with the Max template as well. Template libraries like the Standard Template Library (STL) and the Active Template Library (ATL) are famous for generating tiny code and being highly re-useable.

If you use another language, imagine what is involved to provide something as simple as the Max template, while making it applicable to any class that you define and also to any class that the users of your library define!

Class Templates

You can use class templates to create a family of classes that operate on a type. Look at this example of a balanced binary tree class:

template<class KEY, class ARG_KEY, class DATA, class ARG_DATA>
class CTree 
{
private:
    typedef enum
    {   balLeft = -1,
        balEven,
        balRight,
    } BALANCE;

    class CNode;
    typedef CNode* PNODE;

    class CNode // container to hold the data and hide the balancing details
    {
    public:
        CNode( ARG_KEY key, ARG_DATA data );
        // additional members not shown
    private:
        KEY m_key;
        DATA m_data;
        BALANCE m_Bal; // -1..1 current balance data for this node
        PNODE m_pLeft;
        PNODE m_pRight;
    };

    CTree(){ m_pRoot = 0; m_nSize = 0; m_bHeightChange = false; }
    virtual ~CTree();
    bool GetFirst( ARG_KEY key, ARG_DATA data );
    bool GetLast( ARG_KEY key, ARG_DATA data );
    bool GetNext( ARG_KEY key, ARG_DATA data );
    bool GetPrev( ARG_KEY key, ARG_DATA data );
    bool Add( ARG_KEY key, ARG_DATA data );
    ARG_DATA operator[]( ARG_KEY key );
    bool Delete( ARG_KEY key );
    // additional members not shown

private:
    CNode* m_pRoot;
    bool m_bHeightChange;
    int m_nSize;
};

I have specifically used a complex example here, to drive home the point that templates can save you a lot of programming. If you have ever coded a balanced binary tree, you know that it is difficult, and depending on the programming language, messy code to write. I have personally had the pleasure of coding such a library three times in three different languages: C, Pascal and C++. In C and Pascal, I was able to use untyped pointers to allow the tree to hold any data type, but in both of these cases, I limited the key to be a string.

The C++ implementation in the above example can contain any data type, can use any data type for the key, and the implementation is completely type safe!

Let's examine the template's declaration:

template<class KEY, class ARG_KEY, class DATA, class ARG_DATA>
class CTree

The four arguments in the declaration give the data type of the key, how the key is passed into arguments, the data type of the data the tree will contain and how the data is passed into arguments. Here are some examples of how the CTree could be instantiated:

CTree<CString, const char*, CVeryLong,
CVeryLong&> treeVeryLong; CTree<CString, const char*, float,
float> treeFloat; CTree<long, long, CString, const
char*> treeString; CTree<CVeryLong, 
  CVeryLong,CList<int, int>, 
  <int,int>&> treeList;

The first case is a tree of CVeryLongs using a CString as the key. The key is passed into arguments as a const char* and the data is passed into arguments using a reference to CVeryLong.

The second case is similar to the first except that the data is a float type.

The third case is a tree of strings that use a long for the key.

In the fourth case, a tree of linked lists of integers (another class template) is using CVeryLong types for the key.

We could use the treeVeryLong template to keep track of programmer salaries:

treeVeryLong.Add( "Ray", CVeryLong( 100, 50 ));
treeVeryLong.Add( "Barb", CVeryLong( 200, 25));

// Note that the bracket operator [] was overloaded in our CTree class
// to allow following type of addressing of our tree, and the greater than
// operator of the CVeryLong class enables the comparison

if ( treeVeryLong[ "Barb" ] > treeVeryLong[ "Ray" ] )
{    
    cout << "Barb is the best!" << endl;
}
else
{
    cout << "Ray is the best!" << endl;
}

Actually there is an error in this code - do you see it? We specified in our template declaration that the ARG_DATA parameter was to be a reference to a CVeryLong (ARG_DATA CveryLong&). Since we are passing in a constant here, the compiler will complain. We can correct this error by changing the template declaration to allow data arguments to be passed in by value, or modify the code as follows:

CVeryLong vlRay( 100, 50 );
CVeryLong vlBarb( 200, 25 );
treeVeryLong.Add( "Ray", vlRay );
treeVeryLong.Add( "Barb", vlBarb );

Class templates provide a powerful code reuse mechanism that can save a tremendous amount of programming. In addition to saving development time, use of templates will generally result in much smaller projects. Microsoft ships two libraries with Visual C++: Microsoft Foundation Classes (MFC) and the Active Template Library (ATL). ATL was developed in response to the advent of the Internet, more specifically to the large number of people with slow access (read 28.8k) to the Internet. MFC projects were too large to be practical for creating web page objects that had to be downloaded to the client's computer. ATL was the solution to this problem -- projects based on ATL are very small and quick to download.

Conclusion

I readily admit to being a C++ bigot, but it is bigotry born of experience with several languages, operating systems and Windowing systems. Programming code in C++ is a pleasure and I would not look forward to having to return to the old days without operator overloading, exceptions and templates.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

William T. Block
Software Developer (Senior) Baker Hughes
United States United States
Member
Bill's recent projects include graphical displays and printing of real-time data for the Oil Industry.
 
"I started programming Windows' applications right after the release of Windows 1.0 and I am now actively working with Microsoft .NET"
 
He currently works for Baker Hughes in the Houston, Texas area.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberwangxj_nemo2 Aug '12 - 23:27 
高人
GeneralA good articlememberLZS53526154826 Mar '12 - 15:34 
I am a Chinese student and I also chose C++.After reading your article,I have more interesting to learn and to master it.
GeneralMy vote of 5memberShaoQinZeng24 Sep '11 - 22:09 
Nice
QuestionYour thoughts todaymemberAhmed Charfeddine21 Jul '11 - 2:25 
What are your thoughts today William ?
Smile | :)
Push Framework - now released !
http://www.pushframework.com

GeneralMy vote of 5memberErick OMARI13 Mar '11 - 13:49 
Very helpful for new programmer. The key word is to be more consistent as much as possible when writing large C code.
GeneralMy vote of 5membertianyige21 Nov '10 - 15:40 
good!
GeneralGOODmemberpxl200129 Oct '08 - 3:27 
I would like VB,but never use VC.
Generali like delphi.membereleven101212 Oct '08 - 2:46 
i like delphi. Wink | ;)
GeneralGoodmemberryan.zhou22 Jul '07 - 20:33 
A good primer which reveals those confusing differences.
 
ryan.chou
GeneralGood articlememberJingtan_Tan14 Dec '06 - 14:48 
I choose c++ for interesting.
GeneralGood articlememberJingtan_Tan14 Dec '06 - 14:45 
Good article
QuestionIt's '05, Is it still the best?memberHamed Mosavi9 Dec '05 - 10:28 
Hi,
I'm learning, working, enjoing and living with C++.Rose | [Rose]
I'm sometimes afraid to be obsolete with the born of new technologies, like C#.
I some times think what if .net completely fills the future so me and my love, C++ will be alone!!
I did not move to CLI nor to vc++2005 yet, but if they are like VC++ .net 2003 then will c++ live successfully a long life? I mean better or not finally a day the world selected C programmers over Assembler! They had more jobs and ... .
I think "managed code" has not been a success! Will C++/CLI?Confused | :confused: Confused | :confused: Confused | :confused:
If any one with a good vision or knowledge can answer this, (s)he'll be appretiated.
Thanks alot in advanced.
 
//This is not a signature
while (I'm_alive) {
   printf("I Love Programming");
}
AnswerRe: It's '05, Is it still the best?membermementomori18 Jul '07 - 10:27 
The world selected C over Assembler someday because C was much easier to work with, with only slightly more overhead.
But to compare C++ with C#, it's just wrong... Not to mention all the troubles with the CLR and JIT all-together.
The way I see things: C# is NOT a threat to C++ since C# is RAD (Rapid Application Development) not really aimed at performance. It's competing with VB maybe, Delphi perhaps, but not C++.
In fact almost everyone I know, even C++ fanatics are using C# or VB to write on-demand or small commercial software, but very few who would actually use them (especially not VB) to write a 3d game or an application that is performance-oriented.
 
I don't thing that day where we will be obsolete will come anytime soon Smile | :)
I think the days of Java are counted. Now I'll be flamed by all Java Armies but that's what I think :P
 
Cheers
GeneralRe: It's '05, Is it still the best?memberHamed Mosavi18 Jul '07 - 22:34 
One year and a half, since I posted that message. First I saw that reply I thought some one else created a user similar to my ID!OMG | :OMG:
 
I learned a bit of C# and .net, I even learned some asp.net during the last year.Cool | :cool:
 
If you ask me now, those guys at visual studio team focused so badly on C# that to me it is like they say, C# or nothing else. I created a project in MFC and it was so slow that I totally forget that and reinstalled my vs 6.0. Even with win32 I have seen smaller but similar behavior.
 
I still love c++ and do all my works with it. Working with C# just gave me more confidence to continue with C++. I even write my database applications with C++ and NOT C# (I even prefer MFC!). As long as it depends to me, C#(and afterward technologies like WCF) is very good for a team perhaps or a web site developer, but not that good for an stand alone application programmer.
 
I think I found out why I don't like C#(well, who cares), I wrote it on my blog[^]
 
// "Life is very short and is very fragile also." Yanni
while (I'm_alive)
{
cout<<"I love programming.";
}

GeneralAnother Good Reasonsusscplusplusfriend19 Jul '05 - 6:49 
After working with so many programming languages for more than two decades, I was wondering the same question: Why people still chooses to use C++? Why use this ideographical code full of especial character symbols full of meaning and different interpretation? A “*” sometimes means this but sometimes means that…Why waste lines and lines of code to check if a simple variable have space enough to hold a simple file name? And don’t forget to free the memory at the end. Why this separation of source code in .hpp and .cpp to define classes when everybody know that a unique repository is a very important principal of software documentation. Technically this article is very good. The ideograph in a template definition is terrible but work brilliantly. It looks like they are still trying to imitate it on Delphi. "Next version, next version" They said. I think that we should take a real look in some modern programming. There are some serious advantages over there. But anyway, I found my reasons why to use C++ and I want to share with the audience:
1. If you already using it and you are making money of it;
2. If there is some legacy code you need to integrate;
3. If you love templates and you can’t live without it;
4. If you want your company to hire only Professional programmers.
This last and sinister item needs some explanation. Or maybe not, if you know what I am talking about… I will give it anyway. As it is so hard to do a good coding in C++, only very professional programmers can survive. And that is the thing: good programmers don’t like to fix the pour deigned code that comes from people that use those other easy-to-use-easy-to-learn programming language.

GeneralRe: Another Good ReasonsussWilliam Block22 Jul '05 - 2:51 
A lot of your arguments do not hold water. For example, you refer to having to check to see if a buffer is large enough before copying to it...this is basically true if you are coding at a C level, but the point of using C++ is to code at a C++ level.
 
The Standard C++ Library (formerly known as Standard Template Library) provides a wealth of containers where you can just assign data and not worry about allocating space: vector, queue, stack, string, list, map, etc. With this library, it is possible to assign a quoted string to string variable without having to allocate it as you would in the C runtime library.
 
Having said all of that, trying to access data beyond the end is always going to be an issue. What do you expect to happen if you try to read the 5th character out of a three chracter string? I believe this is an error no matter what the language. Unfortunately, there is no substitute for careful and maticulous programming.
GeneralRe: Another Good Reasonsusscplusplusfriend26 Jul '05 - 8:08 
Mr. Block. I understand your point. But I keep finding people using C level string manipulation. Even in new project. Did they get the memo?
 
With just one hole we can drain the water of my arguments. That is going to take longer to dry out, but you have mentioned 'a lot'. Don't you?
 
But you are right. There is another hole. If we can find pour designed code is C++ too, the advantage mentioned at my list is a mistake.
 
Sorry.

QuestionWhat next?memberPashton30 Jun '05 - 12:36 
Hi everyone,
After alot of searching on Google i finally got to this website. I created this thread to everyone that is stuck like me, i learned c++ (atleast i think i did so) but now i dont know what is next. I want to build colourfull things instead white text on black screen, i have heard about OpenGL, DirectX, GUI and so on... but these make no sense to me, can some one please help me by guiding me, where to go next, any Books any one would like to recommend, website anything would be helpfull.
Thanks in Advance.
AnswerRe: What next?memberChristian Graus30 Jun '05 - 14:38 
First step - post questions to the C++ forum.
 
Second, browse the articles on this site.
 
Third, if you want to do OpenGL, google for nehe, and do the tutorials on his site.
 
Before all that, if you really meant you've never done a GUI app, this is the right site to get heaps of info on that.

 
Christian Graus - Microsoft MVP - C++
GeneralRe: What next?sussAnonymous30 Jun '05 - 17:49 
Thaks,
Oh this is a great website, the reply was really fast.
Yes i have never done a GUI app before, so what would be a good place to start, and do i have to Know GUI before OpenGL?
Thanks
GeneralGood Free C++ TutorialsmemberChris Quick24 Feb '05 - 5:40 
I'm a native VB.NET programmer and would like to explore the world of C++. (Mainly because the ability to use many of the Microsoft API's are for C++ programmers... not VB.NET). I'm looking for a good place to start with free learning tutorials on C++, especially for the microsoft platform.
GeneralRe: Good Free C++ Tutorialssussalejandro varela25 Aug '05 - 19:37 
You CAN use win32 APIs with VB.net
QuestionWhat i knowmembergoodmast3r28 Sep '04 - 19:57 
1. C++ has memory leak problem
2. java has no memory leak problem,with it`s garbage collector
 
Is that sure? Which should I choose?
 


Work hard and a bit of luck is the key to success.
Smile | :)
AnswerRe: What i knowmemberRyan Binns28 Sep '04 - 20:19 
goodmast3r wrote:
C++ has memory leak problem
 
No it doesn't. Badly written programs have memory leak problems. A well written C++ program has no more memory leak problems than a well written Java program.
 
goodmast3r wrote:
java has no memory leak problem,with it`s garbage collector
 
Wrong. Java programs can easily have memory leaks when the garbage collector thinks a piece of memory is still being used, but it isn't. I've seen it happen lots of times. This is especially a problem using the collection classes. Most people just don't notice because they believe the garbage collector will sort it out so they don't bother checking for memory leaks. IMO, garbage collectors seem to promote bad program design; they almost encourage irresponsible memory handling.
 
goodmast3r wrote:
Which should I choose?
 
Which do you know the best? Does the program need to be compiled once and run anywhere? Or can you compile it on whatever platform you're targetting? Do you want to be able to overload operators (you can't do this in Java)?
 
Personally, I would never use Java for anything except web applications because I think it's a pile of stinking horse manure, but it's really up to you.
 
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralSuggest a website for intermediate programersussC Lin29 Oct '02 - 14:07 
Dear all,
I found that the best way to learn a programming language is by going through an example or a project by myself. In the process I'll discover a lot of questions and points that will otherwise be overlooked by just reading the books.
 
Can anyone suggest a website that contains small C/C++/Java project (beginner or intermediate level) for self-learners?
 
Thank you all in advance

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 21 Mar 2000
Article Copyright 2000 by William T. Block
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid