Author: José Carlos
Date: 10:33:23 11/16/02
Go up one level in this thread
On November 16, 2002 at 12:54:28, Bob Durrett wrote: >On November 16, 2002 at 12:32:00, José Carlos wrote: > >>On November 16, 2002 at 12:23:49, Bob Durrett wrote: >> >>>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? >> >> As I said, most (if not all) C++ compilers are also C compilers. Particularly, >>Visual C++ is also Visual C. >> C++ was born as an evolution of C. C is almost a subset of C++. >> >> José C. >> > >I know this question is going to sound EXTREMELY DUMB, and will try the patience >of the real programmers here, but: If I wish to follow Bob Hyatt's source code, >written in C, then won't I get confused if I try to do it using Visual C? C and >Visual C distinct? > >Bob D. Visual C/C++ is just a compiler; C and C++ are languajes. The compilers just take the code written in some languaje and translate it to machine code. To compile Crafty with Visual C you need to create something called 'project'. A project in Visual C is a set of source code files put together so the compiler knows they all belong to the same program. I haven't compiled Crafty, but I'm sure Dann has a project file for Visual C. José C. >> >>>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.