Login Register


Setting Up A C++ IDE filter_list
Author
Message
Setting Up A C++ IDE #1
Hello, Code Community Members!

The fact that you clicked on this thread shows that you probably want to learn how to set up a c++ IDE, or maybe you're just curious.

Well, either way, keep on reading if you want to know how!

First of all.

What is an IDE, Xiledcore?

You might think that this is a dumb question, but trust me, it's not! We all asked ourselves the same question at some point.

IDE stands for Integrated Development Environment. It's basically a tool for programmers that gathers the compiler, linker, editor and debugger into one place to make it easier to develop applications.

Okay, now how do i get one, smarty?

Yes, that's really easy. There are various different free C++ IDE, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First, go on http://www.bloodshed.net/

And then click on downloads.

[Image: 5tM0elwh.png]
[Image: IJmZXbRh.png]
[Image: U2MgX6wh.png]

Note: Downloading the latest version isn't always the wisest decision, but for now, we'll do so.

Now scroll down the page until you see:

[Image: fCaHSoHh.png]

Now your download will begin shortly. After it's been downloaded, you just go through the installation and run the program. Now, let's just create a simple program to test if it works.

[Image: 0qm4MUT.png]
[Image: MrJHLuG.png]

Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time. However, in larger applications, using this wouldn't be very efficient. void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function return 0; }

And you'll get this:

[Image: 8Va8Z6m.png]

That's basically it! Any questions, please post them in this thread and I'll do my utmost to answer them all.

(Yes, I used paint to do the pictures and please excuse me for my terrible censoring skills, and not to mention graphic skills all together).

Useful information:

Spoiler:
(07-25-2013, 11:48 PM)0xDEADPIXEL Wrote: If you don't mind, I would like to point out some mistakes in your tutorial and some suggestion which in my opinion provide a better learning journey and use of C++.

(07-24-2013, 09:17 AM)Xiledcore Wrote: There are various different free C++ compilers, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First of all, Dev-C++ is not a compiler, but an IDE. On one of the pictures it says that Dev-C++ comes with a full Mingw compiler system. If you plan to use the Dev-C++ IDE you should use the more modern and maintained version, which is Orwell Dev-C++. It features a more modern version of the compiler (it's not the latest one, but it supports some C++ 11 features), but clearly a lot better than the deprecated version which comes with the regular Dev-C++ IDE.

(07-24-2013, 09:17 AM)Xiledcore Wrote: Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function system("PAUSE"); return 0; }

Omitting the "using namespace std;" line is actually better practice and is endorsed by the C++ standard, but this works too and when building big programs you may get errors if you name a function with the same name as one from the included namespace.

Pausing the console application from closing with "system("PAUSE");" is considered bad practice among C++ programmers, one of the reasons for that is because it isn't portable, meaning you can only use it on Windows, it won't work on Linux, OS X and etc. Take a look at here for more reasons why not to use "system("PAUSE");"

Also, here you can read more about alternative methods of pausing the console application so you can read the output.

I would also like to add a suggestion about the compiler, if you are a Windows user, go with GCC or MSVC. Here's a link to a custom MinGW distribution featuring the latest GCC version which is C++ feature-complete. I use this one when I compile code on Windows.

Hope I wasn't too long Biggrin
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: Setting Up A C++ Compiler #2
Great tutorial !
Good work father!
[Image: tumblr_m4vms28lYu1qj3ir1.gif]

Reply

RE: Setting Up A C++ Compiler #3
(07-24-2013, 06:15 PM)Eternity Wrote: Great tutorial !
Good work father!

Thank you, Son!

I will be doing more.
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: Setting Up A C++ Compiler #4
If you don't mind, I would like to point out some mistakes in your tutorial and some suggestion which in my opinion provide a better learning journey and use of C++.

(07-24-2013, 09:17 AM)Xiledcore Wrote: There are various different free C++ compilers, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First of all, Dev-C++ is not a compiler, but an IDE. On one of the pictures it says that Dev-C++ comes with a full Mingw compiler system. If you plan to use the Dev-C++ IDE you should use the more modern and maintained version, which is Orwell Dev-C++. It features a more modern version of the compiler (it's not the latest one, but it supports some C++ 11 features), but clearly a lot better than the deprecated version which comes with the regular Dev-C++ IDE.

(07-24-2013, 09:17 AM)Xiledcore Wrote: Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function system("PAUSE"); return 0; }

Omitting the "using namespace std;" line is actually better practice and is endorsed by the C++ standard, but this works too and when building big programs you may get errors if you name a function with the same name as one from the included namespace.

Pausing the console application from closing with "system("PAUSE");" is considered bad practice among C++ programmers, one of the reasons for that is because it isn't portable, meaning you can only use it on Windows, it won't work on Linux, OS X and etc. Take a look at here for more reasons why not to use "system("PAUSE");"

Also, here you can read more about alternative methods of pausing the console application so you can read the output.

I would also like to add a suggestion about the compiler, if you are a Windows user, go with GCC or MSVC. Here's a link to a custom MinGW distribution featuring the latest GCC version which is C++ feature-complete. I use this one when I compile code on Windows.

Hope I wasn't too long Biggrin
[Image: dCNByK5.png]

Reply

RE: Setting Up A C++ Compiler #5
(07-25-2013, 11:48 PM)0xDEADPIXEL Wrote: If you don't mind, I would like to point out some mistakes in your tutorial and some suggestion which in my opinion provide a better learning journey and use of C++.

(07-24-2013, 09:17 AM)Xiledcore Wrote: There are various different free C++ compilers, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First of all, Dev-C++ is not a compiler, but an IDE. On one of the pictures it says that Dev-C++ comes with a full Mingw compiler system. If you plan to use the Dev-C++ IDE you should use the more modern and maintained version, which is Orwell Dev-C++. It features a more modern version of the compiler (it's not the latest one, but it supports some C++ 11 features), but clearly a lot better than the deprecated version which comes with the regular Dev-C++ IDE.

(07-24-2013, 09:17 AM)Xiledcore Wrote: Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function system("PAUSE"); return 0; }

Omitting the "using namespace std;" line is actually better practice and is endorsed by the C++ standard, but this works too and when building big programs you may get errors if you name a function with the same name as one from the included namespace.

Pausing the console application from closing with "system("PAUSE");" is considered bad practice among C++ programmers, one of the reasons for that is because it isn't portable, meaning you can only use it on Windows, it won't work on Linux, OS X and etc. Take a look at here for more reasons why not to use "system("PAUSE");"

Also, here you can read more about alternative methods of pausing the console application so you can read the output.

I would also like to add a suggestion about the compiler, if you are a Windows user, go with GCC or MSVC. Here's a link to a custom MinGW distribution featuring the latest GCC version which is C++ feature-complete. I use this one when I compile code on Windows.

Hope I wasn't too long Biggrin

Very informative post, thank you. It appears I have done some mistakes and thank you for correcting me.

Also, I'm clearly not an experienced c++ coder so I might have been doing stuff that would be considered bad practise. I really appreciate you pointing out my faults, and I'll do my best to learn from it so I can improve my skills as a programmer.

I'll be quoting your post on the thread in a spoiler.

Once again, Thank you. And no, It wasn't too long.
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: Setting Up A C++ IDE #6
(07-25-2013, 11:54 PM)Xiledcore Wrote:
(07-25-2013, 11:48 PM)0xDEADPIXEL Wrote: If you don't mind, I would like to point out some mistakes in your tutorial and some suggestion which in my opinion provide a better learning journey and use of C++.

(07-24-2013, 09:17 AM)Xiledcore Wrote: There are various different free C++ compilers, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First of all, Dev-C++ is not a compiler, but an IDE. On one of the pictures it says that Dev-C++ comes with a full Mingw compiler system. If you plan to use the Dev-C++ IDE you should use the more modern and maintained version, which is Orwell Dev-C++. It features a more modern version of the compiler (it's not the latest one, but it supports some C++ 11 features), but clearly a lot better than the deprecated version which comes with the regular Dev-C++ IDE.

(07-24-2013, 09:17 AM)Xiledcore Wrote: Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function system("PAUSE"); return 0; }

Omitting the "using namespace std;" line is actually better practice and is endorsed by the C++ standard, but this works too and when building big programs you may get errors if you name a function with the same name as one from the included namespace.

Pausing the console application from closing with "system("PAUSE");" is considered bad practice among C++ programmers, one of the reasons for that is because it isn't portable, meaning you can only use it on Windows, it won't work on Linux, OS X and etc. Take a look at here for more reasons why not to use "system("PAUSE");"

Also, here you can read more about alternative methods of pausing the console application so you can read the output.

I would also like to add a suggestion about the compiler, if you are a Windows user, go with GCC or MSVC. Here's a link to a custom MinGW distribution featuring the latest GCC version which is C++ feature-complete. I use this one when I compile code on Windows.

Hope I wasn't too long Biggrin

Very informative post, thank you. It appears I have done some mistakes and thank you for correcting me.

Also, I'm clearly not an experienced c++ coder so I might have been doing stuff that would be considered bad practise. I really appreciate you pointing out my faults, and I'll do my best to learn from it so I can improve my skills as a programmer.

I'll be quoting your post on the thread in a spoiler.

Once again, Thank you. And no, It wasn't too long.

Good explanation, both of you <3. I now know a bit more of C++ :d

Reply

RE: Setting Up A C++ IDE #7
(07-29-2013, 07:24 PM)Platinum Wrote:
(07-25-2013, 11:54 PM)Xiledcore Wrote:
(07-25-2013, 11:48 PM)0xDEADPIXEL Wrote: If you don't mind, I would like to point out some mistakes in your tutorial and some suggestion which in my opinion provide a better learning journey and use of C++.

(07-24-2013, 09:17 AM)Xiledcore Wrote: There are various different free C++ compilers, but in my tutorials later on, I'll be using Dev C++ so I'll only show you how to get that one.

First of all, Dev-C++ is not a compiler, but an IDE. On one of the pictures it says that Dev-C++ comes with a full Mingw compiler system. If you plan to use the Dev-C++ IDE you should use the more modern and maintained version, which is Orwell Dev-C++. It features a more modern version of the compiler (it's not the latest one, but it supports some C++ 11 features), but clearly a lot better than the deprecated version which comes with the regular Dev-C++ IDE.

(07-24-2013, 09:17 AM)Xiledcore Wrote: Now, type in this:

Code:
#include <iostream> //Includes the iostream library for input and output commands #include <string> //Includes the string library using namespace std; //Prevents us from typing std::string or std::cout all the time void tutorial() //A simple function { string tut("Was this tutorial any good?"); //String variable string tut2("Please tell me what you think by commenting on the thread :)"); //Another string variable cout << tut << endl << tut2 << endl; //Prints those two string variables onto the console } int main() //The Main Function { tutorial(); //Calls the function system("PAUSE"); return 0; }

Omitting the "using namespace std;" line is actually better practice and is endorsed by the C++ standard, but this works too and when building big programs you may get errors if you name a function with the same name as one from the included namespace.

Pausing the console application from closing with "system("PAUSE");" is considered bad practice among C++ programmers, one of the reasons for that is because it isn't portable, meaning you can only use it on Windows, it won't work on Linux, OS X and etc. Take a look at here for more reasons why not to use "system("PAUSE");"

Also, here you can read more about alternative methods of pausing the console application so you can read the output.

I would also like to add a suggestion about the compiler, if you are a Windows user, go with GCC or MSVC. Here's a link to a custom MinGW distribution featuring the latest GCC version which is C++ feature-complete. I use this one when I compile code on Windows.

Hope I wasn't too long Biggrin

Very informative post, thank you. It appears I have done some mistakes and thank you for correcting me.

Also, I'm clearly not an experienced c++ coder so I might have been doing stuff that would be considered bad practise. I really appreciate you pointing out my faults, and I'll do my best to learn from it so I can improve my skills as a programmer.

I'll be quoting your post on the thread in a spoiler.

Once again, Thank you. And no, It wasn't too long.

Good explanation, both of you <3. I now know a bit more of C++ :d

I'm glad you know more c++! Keep at it, and become good. Smile

And yeah, me and deadpixel are the c++ duo hehe.
[Image: WV5eQ42.jpg]

If you've got any questions regarding c++ or java, feel free to hit me up with a private message at any time.

http://adf.ly/UyTEk

Reply

RE: Setting Up A C++ IDE #8
I use CodeBlock for C++ IDE....It is really nice....With my experience, I prefer CodeBlock instead of DevCPP !! CodeBlcok also support C++11.

I don't know what you really preferred...but it worth to try out!!
[Image: coolsignature.gif]
:angel:

Reply

RE: Setting Up A C++ IDE #9
Pretty good tutorial! Good job.

Reply

RE: Setting Up A C++ IDE #10
(07-30-2013, 03:54 PM)zosoftnet Wrote: I use CodeBlock for C++ IDE....It is really nice....With my experience, I prefer CodeBlock instead of DevCPP !! CodeBlcok also support C++11.

I don't know what you really preferred...but it worth to try out!!
Actually it is the compiler that supports C++ 11 and not the IDE. For example, if you get Orwell Dev-C++, which is a maintained version of Dev-C++ you also get a more recent version of the GNU compiler collection which supports some C++ 11 features. Since both Code::Blocks and Dev-C++ (whether it be the standard one or the Orwell one) don't come with the latest version of the GNU compiler collection, it is best to set up the compiler separately with an IDE of choice so that you can be able to utilize all of the C++ 11 features.
[Image: dCNByK5.png]

Reply







Users browsing this thread: 1 Guest(s)