gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > I've just started learning c++...

#116937 - SickNalzic - Wed Jan 31, 2007 4:38 am

But i can't find a good compiler program similar to visual studio.. i can't get that program b/c i accidentally uninstalled service pack 2 (don't ask <_>), and can't reinstall it (also don't ask :P)... all I really need right now is a good compiler and that comes with a bunch of include files, but an editor (like visual studo) would be nice aswell, for the future... i used some bloodshed program but i can't figure it out (im too used to visual studio >_<) it might just be because im tired, so ima look more into it in the morning... so summed up, does anyone know a good program for compiling c++?

this is what i've done so far (nothing complex, obviously)

Code:
#include <iostream.h>

void main()

{
float num1;
float num2;
float total;

cout << "Type the first number: ";
cin >> num1;
cout << "Type the second number: ";
cin >> num2;
total = num1 + num2;
cout << "The sum of these numbers is: " << total << end1;
}

#116945 - gauauu - Wed Jan 31, 2007 5:43 am

Are you looking for a windows IDE and compiler? I think bloodshed's dev-cpp (which I think you mentioned) is one of the better free packages that does it all and hooks it all up for you. If you have specific questions about how to use it, I can help.

Otherwise, get the mingw gcc compiler and vim :)

#116964 - keldon - Wed Jan 31, 2007 12:07 pm

Why recommend 'vim' to a newcomer. It would be much more logical to recommend programmers notepad and editplus

You can get visual editors to work with your environment, but it takes some tinkering; and it is often much easier to just work with one text editor (such as programmers notepad or editplus) and one with the console that comes with DevkitAdvance

#116979 - gmiller - Wed Jan 31, 2007 2:30 pm

There is always code blocks http://www.codeblocks.com

#116982 - Optihut - Wed Jan 31, 2007 3:24 pm

I tried both code::blocks and dev-C++. My subjective preferance would be dev-C++, but SickNalzic already said that he did not like it, so perhaps code::blocks is indeed worth trying.

#116987 - gauauu - Wed Jan 31, 2007 3:53 pm

keldon wrote:
Why recommend 'vim' to a newcomer. It would be much more logical to recommend programmers notepad and editplus


You're right. I was mostly joking at that point, but recommending vim for a newcomer is a bad idea...

#116990 - wintermute - Wed Jan 31, 2007 4:26 pm

keldon wrote:
Why recommend 'vim' to a newcomer. It would be much more logical to recommend programmers notepad and editplus

You can get visual editors to work with your environment, but it takes some tinkering; and it is often much easier to just work with one text editor (such as programmers notepad or editplus) and one with the console that comes with DevkitAdvance


Programmer's notepad is supplied with devkitARM preconfigured for running makefiles. I'm not sure why you'd recommend a console, don't most people enjoy the luxury of clickable errors in their editor in this day & age?

It looks like the poster is learning C++ on windows though - devcpp & codeblocks are both reasonably nice IDEs which use the MinGW compiler.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#116996 - gmiller - Wed Jan 31, 2007 6:05 pm

It is pretty easy to set it up to use DevKitPro ...

#117004 - SickNalzic - Wed Jan 31, 2007 7:04 pm

ok i guess theres nothing wrong with dev-c++ >_<
the problem was that i was using "obsolete" code

i replaced
Code:
 
#include <iostream.h>
void main()

with
Code:

#include <iostream>
using namespace std;
int main()

and added
Code:

system("pause");
return 0;

insted of
Code:

end1;

#117019 - keldon - Wed Jan 31, 2007 8:21 pm

I didn't know it came with programmers notepad. From which version?

#117023 - sgeos - Wed Jan 31, 2007 8:48 pm

keldon wrote:
I didn't know it came with programmers notepad. From which version?

It's in the newest installer.

-Brendan

#117106 - kusma - Thu Feb 01, 2007 10:38 am

wintermute wrote:
I'm not sure why you'd recommend a console, don't most people enjoy the luxury of clickable errors in their editor in this day & age?

Speaking of consoles, Console 2 is quite neat together with devkitPro/MSYS... ;)

#117107 - Vich - Thu Feb 01, 2007 10:44 am

If you're programming the same way as you're avoiding the troubles you're facing(Windows installation farked, setup that won't run) you might as well not start programming ;)
Or did you think that this SP2 think isn't going to bite you later on? :)
Don't work around problems, fix them ffs! (plus, Visual Studio is the best environment you can get at the moment for C/C++ development)
_________________
[project website] [personal website]

#117109 - kusma - Thu Feb 01, 2007 10:49 am

Vich wrote:
If you're programming the same way as you're avoiding the troubles you're facing(Windows installation farked, setup that won't run) you might as well not start programming ;)
Or did you think that this SP2 think isn't going to bite you later on? :)
Don't work around problems, fix them ffs! (plus, Visual Studio is the best environment you can get at the moment for C/C++ development)


I suspect the issues he has is due to Yarr...

#117116 - PhoenixSoft - Thu Feb 01, 2007 11:47 am

SickNalzic wrote:

end1;


That was meant to be 'endl', not 'end1' - it is an abbreviation of 'end line'.