Question:
How to re-install C++ compiler?
2013-11-07 02:45:59 UTC
I've Windows 8.1 on my PC.
I use C++ Code Blocks and Turbo C++ v3.0 (sometimes).
Compiling my programs gives garbage values always. Even a simple calculator isn't working properly.
I've tried assigning null values to my variables and clearing cache. Tried re-installing all the software (including Microsoft Visual C++ 2010 Redistributable) but that didn't serve the purpose.

#Resetting my PC will downgrade it to Windows 8 and I'm not willing to lose the current version (Windows 8.1)

Any help guys?
Three answers:
husoski
2013-11-07 04:21:21 UTC
Turbo C++ uses a pre-standard version of C++ that is NOT compatible with modern C compiler (neither Visual C++ nor MinGW's g++ still support . It's been just since the 1998 standard. Namespaces are new to C++98, too, having been added to the standard before showing up in most compilers. TC++ never got them.



So, your TC source files will never compile under MinGW g++ (assuming that's what you're using with Code::Blocks) and your modern C++ source files (for MinGW, Visual C++ or any other modern compiler) won't ever compile under TC++.



There is nothing you can do about that other than to keep the project files in separate directories and slowly convert the TC sources to the modern language.



You should be able to run TC++ with any other compiler installed, and the Code::Blocks+MinGW cobundle for Windows provides its own private copy of MinGW. I have three different Visual C++ compilers, two different MinGW versions, a MinGW-64 version, Cygwin with GNU tools including g++, plus Code::Blocks with its own private MinGW, all installed and not conflicting.



Try uninstalling both compilers, then install both...TC3.0 first. Make sure you have the C::B 12.x version and with MinGW included. Don't make either compiler a default for opening cpp/c/h files. Always open the IDE to work on a project for that IDE.



If you need to port sources across, copy first, then update the copy. Unless you want to add special symbols to your builds, and a lot of #ifdef preprocessor blocks, you won't be able to use the same source with both compilers.



I don't know what India law says about copyrighted software that hasn't been offered for sale for over a decade, but there is no legal way to acquire a new legal copy of TC in the USA. TC is dead.
Just Wondering0001
2013-11-07 15:27:11 UTC
Hi,



I'd try seeing if You have a CPU with a "floating point bug", or some other type of known problem like that ...



The way to do it is to dload a copy of Linux, run it from a Live CD/DVD/USB flashdrive (since You'll be compiling code it will perform better with a Live flashdrive) and compile Your code with something like the included Geany editor.



If the CPU has a bug or the software in Windows is not working properly, You'll be able to tell then.



Check at www.distrowatch.com for a lightweight CD distro with Geany and the necessary libraries for Your programs.





G'Luck!!
James Bond
2013-11-07 11:06:54 UTC
You mean Turbo C++ in Dosbox?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...