Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: I'm Confused. C, C++, C#. Which to Use?

Author: Bob Durrett

Date: 09:23:49 11/16/02

Go up one level in this thread


On November 16, 2002 at 12:01:01, José Carlos wrote:

>On November 16, 2002 at 11:45:27, Bob Durrett wrote:
>
>>
>>I'm Confused.  C, C++, C#.  Which to Use?
>>
>>I have an old Visual C++ compiler which I purchased many years ago.  But bulletins
>>posted here seem to favor C, as opposed to C++ as if C is better than C++ for
>>chess engine programming.
>>
>>Still trying to find the best C compiler to use for chess engine design on my
>>Compaq 1 GHz 1GB RAM single-processor PC.
>>
>>Tried to download one but got error message saying NO!
>>
>>Yahoo! seems to find C++ compilers but not C compilers.
>>
>>Sorry for sounding like a child.  : (
>>
>>Bob D.
>
>  Most (if not all) C++ copilers are also C compilers. Visual C++ is.
>  What languaje to choose is a matter of personal preference, because both are
>equally good for chess programming.

I wanted to be able to study Crafty and understand that Bob Hyatt programmed it
in C and not C++.  Similarly, the thesis on chess engines I'm looking at used C
and not C++.  The book I ordered on chess engines may be written in C too, I
don't know.

Well, all my gyrations are for nothing because I just looked at my bookcase at
home and found a book [with a CD] titled "Teach Yourself C in 24 Hours" by Tony
Zhang, SAMS Publishing, Copyright 1997.  It's for Windows 95.  Maybe the
compiler on the CD will run on my Windows 98 machine.

Oddly enough, the author says he compiled all the C programs using Microsoft
Visual C++ version 1.5.  Odd that he uses a Visual C++ compiler to compile a
program written in the C language, but I guess that's what makes programming
interesting?

I guess I'll be up to speed on C in 24 hours?

Bob D.

[2nd Childhood, for sure!]


>  C is conceptually easier to learn. With C++ you can write conceptually more
>complex programs with less complexity for you. Chess is simple enough for making
>C++ conceptual advantage not important.
>  If you don't know any of both, just chose one (I'd suggest C because I like it
>more, but no objective reason) and learn it. Only after you know the languaje,
>start doing chess programming. If you start too soon, you'll get confused and
>lose motivation.
>  My 2 cents.
>
>  José C.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.