Borland C++ is not C++? - c++

One of my career courses is teaching us the basics of "Turbo C". I was never sure if it was C or C++. So i checked the help and it said "Borland C++ Version 3.0".
But when i go look for help on the web, my code seems to be C.
So which one is it or why is it all mixed?

You are able to compile C code with a C++ compiler, with minor changes to the code in some cases.
So even if your code is C there is no problem that you are using Borland C++.
It is even possible that the compiler will detect that it is a C file and apply different rules.

To check what your compiler is doing, try this program:
int new;
int main() { return 0; }
If this compiles then you are using a C compiler; if not then you are using a C++ compiler. You may be able to control your compiler using compiler switches or by changing the extension of the file you are compiling.

The oldest compiler by Borland was "Turbo C". It had no C++ support. But later they added C++, so the compiler was renamed to "Turbo C/C++" and then to "Borland C/C++". All these compilers were backward compatible so sometimes people still refer to "Turbo C" while really speaking of Borland C++ etc.
BTW. Borland's compiler chooses "C" or "C++" mode depending on source file extension.

From wikipedia
In May 1990, Borland replaced Turbo C with Turbo C++.
The name "Turbo C" was not used after version 2.0, because with the release of Turbo C++ 1.0 in 1990, the two products were folded into a single product.
You will be able to directly use most C programs in c++ with just a few changes to the code. Most part of C is supported on C++.

Related

C++ missing Header files

I recently installed Turbo C++ from the official page, and installed it.
But after running it, I found that it was missing many header files (like iostream, iomanip, graphics, conio, etc..). The only header files available were stdio.h and math.h. I want the other header files, because I am trying for creating a project of structure of an atom using graphics, and I need other headers too for I/O operations.
From where can I get these header files? Please help.
Turbo C++ is a compiler/IDE for Borland C++, a dialect of pre-standard C++.
After ISO C++98 ... well, a lot of stuff happened over the intervening two decades.
What you want is one of the modern compilers compliant with at least ISO C++98, but preferably ISO C++11 or ISO C++14.
In a short, not fully inclusive list:
Microsoft Visual Compiler (MSVC), Intel C++ Compiler (ICC), Gnu Compiler Collection (GCC), and LLVM Clang ones I can think of off the top of my head.
There's a number of IDEs, but Eclipse, Code::Blocks, and Visual Studio Code are reasonably popular, and, probably importantly, free.

Integration of Rcpp in c++ with bcc compiler

Hi I`m looking for a library in c++ which i compile with the borland compiler bcc32.
Before I tried to take the benefits of RInside but unfortunately it´s only working with gcc-compiler and can´t be used in my programming environment, wich is Embarcadero.
Is it possible to use Rcpp with a bcc32 compiler?
Are there compatitible librarys on the market doing statistical calculations in c++
I hope you can help me. Thanks.
Part 1: no. From the Rcpp FAQ:
1.3. What compiler can I use. On almost all platforms, the GNU
Compiler Collection (or gcc, which is also the name of its
C language compiler) has to be used along with the corresponding
g++ compiler for the
C++ language. ...
The
clang
and
clang++
compilers from the LLVM project can
also be used ...
The Intel
icc
family has also been used successfully as its output
files can also be combined with those from
gcc
.
If it's not on that list, it's not supported.
Part 2: off topic for StackOverflow.

visual c++ and C++ builder

Can C++builder compile any c++ source files.
I don't have a good knowledge in c++. but i have some experience in delphi.
I like to use c++ but confused which one to use
I know that cbuilder has vcl , easy to develop ,easy for delphi developer
But my problem is can it compile any c++ files (vc++ and other source files).
is it compatible with vc++ (excluding MFC and VCL). Can i use any APIs with c++builder
You'll find C++ Builder very comfy coming from Delphi if you don't care about MFC or .NET via C++/CLI etc and just want native C++ then either will work for you. Visual Studio 2010 supports a lot of the new C++0x features which is pretty nice, although they don't have variadic templates yet. I'm not sure how much of C++0x is in C++ Builder as yet but that could be worth looking into as a deciding factor.
It should be able to compile any standards conforming code. If the code uses extensions that another compiler provides, it will more than likely have problems. VC++ has quite a few extensions that are on by default and so someone using that compiler might use them with out realizing what is going on(the same applies to G++ the other major C++ compiler out there.)
In my experience, C++Builder's support for more advanced C++ code is limited. For example, many of Boost's libraries are unsupported in C++Builder, and I've often had to modify other open source libraries to get them to build properly in C++Builder (due to various bugs or limitations in C++Builder's compiler). Simpler C++ code can work without any problems.
So, depending on what C++ libraries / source files / APIs you're wanting to use, getting them to work in C++Builder may be very straightforward, or it may take significant work.
You can download a free version of C++ Builder at www.embarcadero.com. With that, you can test your libraries for compatibility.

Is there any way to obtain antique versions of Borland's Turbo C++ compiler for free?

I am looking for an old version of the Borland Turbo C++ compiler. However I have to get it in legal way. Has anyone heard something about discounts for such old compilers?
[EDIT]
I would like to publicize my old sources for educational purposes, however they will only compile on this old compiler. I want to show my blog readers what mistakes they should try to avoid while learning a new language.
So It would be great if anyone could download the sources and compile them on their own computer. Therefore, I hope that maybe after so many years, Borland would give these old versions to the public for free...
Embarcadero, the company that now owns Borland's developer tools, gives away a lot of their antique software for free. Turbo Pascal 1.0, 3.02, and 5.5 are available, as are Turbo C 2.01 and Turbo C++ 1.01.
You can download the offerings here (the page is extremely slow, but it will load eventually).
And thanks to Alain Pannetier, who informs us that a slightly newer version, Turbo C++ 5.5, is also available as a free download.
But uh, if you're just looking for a freely downloadable C++ compiler, there are much better options, no time machine required. Check into GCC and/or Microsoft Visual C++ Express.
Are we talking about Pascal or C? There are freeware equivelents that I've used to compile ancient Turbo Pascal projects without a problem (FPK Pascal is one).
Ah, I miss pascal. And quiche.
here are two links for sites that sell old Borland software:
http://www.recycledsoftware.com/servlet/the-BORLAND-C-pls--pls-/Categories
http://www.emsps.com/oldtools/borland.htm
P.S. Why can't you compile the code with a newer compiler? Is it the C++ language
or the libraries you are using?
Jogy

Which C++ does Visual Studio 2008 (or later) use?

I find C++ is very controversial language in microsoft world. By default we have ISO C++ and then microsoft has Managed C++ and now C++ CLI.
I just know standard (ISO) C++. I don't know microsoft's version of C++.
I'm confused about interpretation of any c++ code by visual studio 2008 (or later). Thats why I'm using gnu tools for compiling my programs. But I do love Visual Studio.
What settings do I need to make if I only want to use
STRICTLY ISO C++
Managed C++ (its deprecated but I think they still support it for sake of backward compatibility)
C++ CLI (for .NET platform)
I want to build native assemblies using C++ not managed ones. So, is there anything else should I need to do?
Everything is in the build settings:
Common Language Runtime Support (/clr) - add or remove CLR support
Advance Compile as C++ Code (/TP) - to choose if c++ or c..
Language: Disable Language Extention - use this to force ANSI.
When you ask Visual Studio to make a C++ project, it makes a C++ project. C++/CLI is a different language.
VS2008 and earlier have implemented C++03 (or approximated it. Like almost every other compiler, there are bits of the standard that are not followed to the letter. A few features are not implemented (exception specifications, the export keyword or two-phase name lookup are the ones I can think of), and some proprietary extensions are added as well.
GCC, and most big compilers, do the exact same thing, so this isn't a case of Microsoft being "evil" as such. The extensions can be disabled, leaving you with a reasonably standards-compliant compiler.
VC2010 is adding a number of C++0x features (and at least in the beta, I haven't been able to find an option to disable these), so from a strict C++03 compliance point of view, it is going to be less compliant.
Dani's answer already tells you which settings to change to enable/disable different language dialects.