C++ Compiler

Ginger_Ale

Lurker
Retired Moderator
Joined
Jul 23, 2004
Messages
8,802
Location
Red Sox Nation
Hi all...a while ago I tried C++ compliation, but the complier I had used up all my computer CPU :( (Bloodshed-Dev). Does anyone know of any (small preferably in size) compilers that don't use up too much CPU? I have a 1.8 ghz computer, 256 RAM, lots of hard drive space, Win XP. Thanks. :)
 
I know my local uni uses Emacs, which is free. It's basically a text editor that lets you write and compile code. I've done both C++ and Java programming in it.
 
Emacs itself doesn't do the compiling - it is just an editor. It probably uses gcc for compiling. Unfortunately I cannot offer any advice besides Dev-cpp. :( Also, pretty much any compiler is going to suck up all your CPU power...not much you can do about it....the better ones will just take less time to finish compiling. You could try to get a hold of a Student version of MS Visual Studio or MS C++. There also might be a Student/Free version of Borland C++.

Edit:
Free Borland C++
Free MS Visual C++
I did two searches in google. One for free microsoft C++ and one for free borland C++. Google is lovely! :)

PS: You need more RAM if you are going to be compiling! I would recommend 1 GB if you can. At least 512 MB if you cannot afford to jump to 1 GB. But you really should go for 1 GB. (512 MB DDR go for about 70ish each from www.newegg.com - if you are in the states).
 
comipling is supposed to take all CPU time until is compilation is completed. That is expected & desired design. It should take sec or two anyway.
 
What kind of programs are you writing? I've done basic C++ but nothing complicated. I made a pong game for myself as well as an astrolander game. I don't do it at home though, my school lets you use their computers, and during my programming class I make random programs(I'm about 4 chapters ahead-Prior knowledge of C++ and Java is useful) I suck at Java though, which is bad because the AP Computer classes are in Java. :( I'm never going to be compiling on my computer though, I have 128 MB ram.
 
Sorry for having to bump this thread but I have some good news:

Dev-C++ 4.9.9.0 works! :D I downloaded it, and my CPU is all happy. I turned off this feature that said could take up more memory and CPU, and since then, like Comraddict said, it only takes up the CPU when compiling.

Thanks all!
 
Ginger Ale,

a great alternative to Dev-Cpp is SharpDevelop (#develop). It is an IDE/compiler that was created for the .NET framework. It is used for C# programming. It also lets you program in VB.NET and C++. Also it includes a form designer that you can use to create applications. I say it is one of the most powerful compilers for C++ language and great alternative to Microsoft Visual C++

you can download it from here:http://www.icsharpcode.net/OpenSource/SD/

once you installed it open up the program and then go to File->New->Project

then a box opens and select a C++ project.
 
If you want to teach yourself the nitty-gritty stuff of C++, use something like Borland C++ or DevC++. Visual C++ is sort of like a crutch, since you have the windows forms (with controls to easily add, and you don't have to worry about making your own graphics, loops, etc.) to back you up. A 100% text-based program is best for learning how to program. Then, using a GUI comes next. (I wondered this myself back in the early days of my computer science major. Granted, they were still using Win 95 and 98).
 
Hi again, I have a question: What is the difference between the following programs (and what do they do): Visual Basic, Visual Basic C++, and .NET . Thanks.

Also, here's a calculator program I wrote in C++ (with the help of Chieftess to look at the code and see if there were any shortcuts - one example was using nested loops and not pasting the code over and over ;) Thanks.) It can add, subtract, multiply, and divide, and you can do it as many times as you like.

Here is the Source Code File (cpp) and Executable (exe)

I hope you enjoy. :)
 
There is no "Visual Basic C++". You're thinking of Visual C++. ;)

Visual Basic tended to be more graphical, and more "in English" than C++.

i.e.:

Visual Basic code:

Public Function Add()
Begin
dim a as integer
a = (1 + 5)
return a
End

C++:

int Add()
{
int a = (1 + 5);
return a;
}

It's a matter of syntax. .NET code is similar, but Visual C++ is MUCH more gui-based than Visual C++ 6 (you couldn't use the gui easily). Code is much more object-based in .NET. (a little easier to use on the GUI side, but doesn't work as smoothly with graphics .NET 2003 I've noticed. .NET 2005 Public BETA seems better).

BTW - Ginger_Ale, you still haven't used nested loops. Put another while loop (with a seperate variable with the if statements inside. And cout something like "Enter another equation?"). That way, there's 2 loops. :)
 
Chieftess said:
BTW - Ginger_Ale, you still haven't used nested loops. Put another while loop (with a seperate variable with the if statements inside. And cout something like "Enter another equation?"). That way, there's 2 loops. :)

And where would this go? I have the "redo cout" in an if statement, so that when someone presses "0 - Exit" from the main menu, it will quit, and not ask to redo. You want two while() statements then?
 
Ok, here's a simple example:


int done = 1;
int repeat = 1;

while ( done != 0 )
{
// This is our first loop. We're telling it to repeat until done = 0.

cout << "Select an option: (1 = do something, 0 = exit)";
cin >> done;

// We got the option (i.e., 1 is do something)

while ( repeat != 0 )
{
// Now we keep repeating this until the user presses 0
// do something.
if ( done == 1 ) { /* do whatever you want */ }

cout << "Do you want to do this task again?";
cin >> repeat;

// if it's 1, we start this inner loop over again. If 0, then we go to the outer loop.
} // end of inner loop.

} // end of outer loop.



The output is something like this:

Code:
Select an option: (1 = do something, 0 = exit)1
Do you want to do this task again?1
Do you want to do this task again?1
Do you want to do this task again?0
Select an option: (1 = do something, 0 = exit)0
 
Oh, ok, so I could do that if I had multiple things to do. ie; The first while statement could be chosing between using the calculator or doing something else like a 'combat calculator'. Then they would each have their own while statements and inside the while statements, if statements. Right? :)

About Visual Basic: What is the difference between Visual Basic, Visual Studio, and Visual Basic .NET?
 
Visual Basic - This is the programming language. The base for the other two things.

Visual Studio - This is sort of the "platform" for working with Visual Basic. It might come with several different programs like Visual Basic, Visual Interdev (more web-page oriented using vbScript - similar to Javascript), and VB.NET.

Visual Basic .NET - A 'better' (depends on who you ask and for what purpose) form of Visual Basic. It has more database support, and web support, too. The editor is easier to use, too.

For your first question, that's essentially correct. The main while loops keeps you inside your menu. The secondary loop is to ask you if you want to repeat.

You could have a 3rd loop inside your if statments if you had another level of menus or something. (sub-menus).

This was common back in the DOS days. Infact, I did this (a database program for an address book) in highschool.
 
For reference, here's the tools I use at work for Software (and Webpage) Development:

Visual Studio .NET Enterprise Edition (better database and SQL Server support) - Explained above. It has Visual Basic, Visual C#, and Visual J#. What's the difference? One person said (and I quote), "It's like going from gear shift (C++/J++) to automatic (C#/J#)!".
SQL Server 2003 - This is the database server we're moving too (called migrating). We were using MS Access 2000. It's a more powerful SQL-based database engine.
Frontpage 2003 - Personally, I cringe at the thought of this one, since I like Dreamweaver better, but the top execs want all Microsoft products. Even the new webpage editor who was hired used Dreamweaver before she got her job here. (That's the job I was offered at first).
Crystal Reports - This is the report generation engine. It's used for making reports from the database.
Adobe Photoshop - The standard image editor. Mostly for cropping and adjusting contrast for images for Intranet slideshows. (everyone likes the slideshows I made over the summer, now they're demanding more! It used to be 1 page with 30 images and text. Poor design.)
Visual Interdev - An old Visual Basic scripting tool we used to use before moving to .NET.
MS Access 2000 - Another database program that's on its' way out.
 
Visual Studio .NET Enterprise Edition

If only I had 1,559 dollars... ;)

I have Frontpage XP, Adobe GoLive, Access XP, and Adobe Illustrator (you can't install Photoshop twice unfortunately - it's on my brother's computer, not mine). Not too bad I guess.

Microsoft Visual Basic .NET Standard 2003

Yes! I save over $1,300. :p (Not that I would even buy this yet).

For now, my free compliler works. Now I should go learn more!
 
Ginger_Ale said:
Visual Studio .NET Enterprise Edition

If only I had 1,559 dollars... ;)

I have Frontpage XP, Adobe GoLive, Access XP, and Adobe Illustrator (you can't install Photoshop twice unfortunately - it's on my brother's computer, not mine). Not too bad I guess.

Microsoft Visual Basic .NET Standard 2003

Yes! I save over $1,300. :p (Not that I would even buy this yet).

For now, my free compliler works. Now I should go learn more!
Presumably you're still at school. You can get academic copies of these for a fraction of the cost, yet still the same functionallity. Look into it!

Also:
I used to program exclusively in VB 6. I have a copy of visual studio.net, and have started learning C# => much more powerful than VB.

Visual Studio.net is a collection of compilers for different programming languages, yet they all compile to basically the same executable. In fact, you can write part of the program in one language, and the rest in another. In theory, its also platform indpendent (as long as there is the .net framework and Common Language Runtimes for the different OSs (Linux, Unix, Mac).
 
Back
Top Bottom