atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Aug 14, 2008 3:48 am Post subject: |
|
|
Borland has added various things more or less so for their own objects and such. However, if you look at more in-depth Borland C++ code, it looks a lot like C# (.NET). It adds onto the language itself by adding the OWL (Object Windows Library) and the Turbo Vision library.
Some example Borland C++ code:
(Taken from InvadersfromSpace.zip @ monroeccc.edu)
| Code: | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "highScoreU.h"
#include "InvFromSpaceU.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
ThighScoresFrm *highScoresFrm;
//---------------------------------------------------------------------------
__fastcall ThighScoresFrm::ThighScoresFrm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall ThighScoresFrm::returnBtnClick(TObject *Sender)
{
SpaceInvFrm->Visible = true;
highScoresFrm->Close();
}
//---------------------------------------------------------------------------
void __fastcall ThighScoresFrm::FormShow(TObject *Sender)
{
if (FileExists("ifsHighScores.hss"))
hiSSaveRdt->Lines->LoadFromFile("ifsHighScores.hss");
else
hiSSaveRdt->Lines->SaveToFile("ifsHighScores.hss");
}
//--------------------------------------------------------------------------- |
You can achieve similar code in normal C++ using MFC, which basically like Borland C++, is just an additional object library and a set of classes more or less so for GUI development. (There are other parts to MFC and such though.)
As for differences between compilers, I would say Microsofts is more professional, more up to date with standards, and more to the point of what it is made for. As for Borlands, I have not used it myself, but I would assume it is either a homebrewed compiler, a ported version of another compiler, or something with just additions to compile in their object libs and such as well.
If you are asking which is better to choose from, I would suggest sticking to normal C/C++ and avoid anything with the name Borland in it. _________________
- Retired. |
|