Ok, so I'm trying to learn C++ because we're doing VB in class and our class is moving extremely slowly. I don't understand what exactly a compiler is (I get what it does though) and where I can get one.
Ok, what?
Collapse
X
-
Tags: None
-
RE: Ok, what?
A compiler is a program that converts source code into computer language. You need it or your program will just be a bunch of letters thrown into a file.
easy to install compilers can be bought at most computer stores
I know there's a free one called GCC, you can find it online with google or something
but its a pain to install & use
you have to write your programs in notepad, save them as .c s and then go into dos prompt and compile it from there
like gcc helloworld.c
My school uses it, and I have it installed on my comp, it works, but it doesn't have the other compiler amenities (text editor GUI, etc) -
RE: Ok, what?
Try Dev-C++. It is very easy to use and has an IDE. http://www.bloodshed.net/devcpp.html
Comment
-
RE: Ok, what?
Ugh, stupid everything...
Ok so I'm (tying to) follow this guide that tells me to write this code and compile it.
I wrote it and saved it as .cpp
I installed Dev-C++ and I opened the hello.cpp file and went to Execute-> Compile. What next?Code:#include <iostream.h> int main() { cout << "Hello World!\n"; return 0; }
It (the guide) tells me to run Hello.exe but I can't find it in the folder where the .cpp file is or in the program folder.
Comment
-
-
RE: Ok, what?
More like there is a beta of Visual Studio 2005 on Microsoft's website if you search for it. It is a very nice thing to have (Personally I use Visual Studio 2003 with VisualAssistX [Nice add on to Visual Studio but expensive])
Also, ad0gg, its not a downside to Dec-C++. Every compiler will compile that code the same and it will run and then display nothing. Now, you can always open up the command prompt and then open up your exe from there. Then it will just return to the command prompt and not the OS.
-----Soccr743-----Comment
-
RE: Ok, what?
In my CP class, the school sells us the 7 disc VS.net 2003 and library stuff for $7. They had it online for free, but it was using too much space, so the price comes from the CD's. Maybe I could hook you up with another copy.Nice.Comment
-
Re: RE: Ok, what?
KDevelop automatically adds that line (or something comparable to it), when it compiles. But, KDevelop does not have a Windows version, and I'm assuming you are using Windows.Originally posted by soccr743Also, ad0gg, its not a downside to Dec-C++. Every compiler will compile that code the same and it will run and then display nothing. Now, you can always open up the command prompt and then open up your exe from there. Then it will just return to the command prompt and not the OS.
Comment
-
Re: RE: Re: RE: Ok, what?
You did that wrong btw :POriginally posted by Chromerstatic public void main(String[] args); <--
{
system.out.println ("FFR is teh suck!);
<--
Nah I'm joking. ROFL
Code:public static void main(String[] args) { system.out.println("FFR is teh suck!); }Comment
-
Re: RE: Re: RE: Ok, what?
You did too...Originally posted by soccr743You did that wrong btw :POriginally posted by Chromerstatic public void main(String[] args); <--
{
system.out.println ("FFR is teh suck!);
<--
Nah I'm joking. ROFL
Code:public static void main(String[] args) { System.out.println("FFR is teh suck!); }
Code:public static void main(String[] args) { System.out.println("FFR is teh suck!"); }
Comment


Comment