Well as with all other topics I have a learning thread, and now that I am learning C++ I am making this thread for all my questions dealing with this matter. First question, how or where do I write all my source code? Notepad? Also what compiler do you suggest I use?
It's great you're learning it Very Happy I think it's a hacking attempt at OOP, but Silicon Valley tends to disagree. What platform is this for? If it's the prizm, I say Notepad++ and the GCC package. However, if windows or the like, I think most will suggest using VC++ or MinGW with Netbeans or Code::blocks.
Windows: Visual C++ (Express Edition is free - compiler is included)
Linux: G++ for the compiler, Eclipse for the IDE (CDT version)
Mac OS X: XCode for the IDE, and whatever compiler it defaults to (I think G++?)
Yes it is for the prizm, but ultimately just to learn a great language. Where can I get the Notepad++? I downloaded the GCC but was completely in confusion due to everything every where without explanation. Also is the Notepad++ free?
Edit:
Okay I downloaded notepad++.
I am using Dev-C++ and to try it out I tried some very easy code.

Code:

#include <iostream>
using namespace std;
int main()
cout << "this is a testing program";
return 0;

When I try to compile the compiler gives me an error, this is what it says.
[Build Error] [Project1.exe] Error 1
Well, that's C++, first of all; is that what you were trying to write? Secondly, you need to have braces around the body of your main() function:


Code:
#include <iostream>
using namespace std;
int main() {
    cout << "this is a testing program";
    return 0;
}


Finally, I'm sure it gave more detailed errors than that.
I uses the braces but here are the errors it defined:
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
[Build Error] [Project1.exe] Error 1
What am I doing wrong?
calcman wrote:
I am using Dev-C++ and to try it out I tried some very easy code.


Uh, why? Dev-C++ has been dead for years, it is terribly outdated at this point and basically useless. Uninstall that POS.

GCC is only for Linux and Mac OSX, if you are on Windows and need GCC you need MingW or Cygwin.

But again, since you are on windows, just get Visual C++. It's free, and it's the best (*waaaay* better than pretty much anything else). Won't work for Prizm, but for learning the language it will be a godsend. http://www.microsoft.com/express/Downloads/#2010-Visual-CPP
calcman wrote:
I uses the braces but here are the errors it defined:
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
[Build Error] [Project1.exe] Error 1
What am I doing wrong?
Most likely you told it that you're creating a GUI Windows project instead of a command-line project. Kllrnohj, I see no problem with using Dev-C++ to get basic C/C++ concepts, old as it is, if he's mainly using it as a learning tool.
How do I create a command line project?
KermMartian wrote:
calcman wrote:
I uses the braces but here are the errors it defined:
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
[Build Error] [Project1.exe] Error 1
What am I doing wrong?
Most likely you told it that you're creating a GUI Windows project instead of a command-line project. Kllrnohj, I see no problem with using Dev-C++ to get basic C/C++ concepts, old as it is, if he's mainly using it as a learning tool.


http://www.jasonbadams.net/20081218/why-you-shouldnt-use-dev-c/
I see your point. Point taken... get rid of Dev-C++ and get visual studio.
KermMartian wrote:
Kllrnohj, I see no problem with using Dev-C++ to get basic C/C++ concepts, old as it is, if he's mainly using it as a learning tool.


Terrible advice is terrible. Dev-C++ isn't even any good - it was mediocre when it was being worked on, and now that it is 6 years out of date nobody should be using it. You are suggesting that someone new to the language should start out with an outdated toolset, a bad IDE, and a horrible debugger? Yeah, that will do wonders for teaching the language. I'm sure that won't be a frustrating experience in the least Rolling Eyes
No, I'm suggesting he use a tool that's simple, lightweight, and has in my experience worked quickly and more than sufficiently. I'd really prefer he be using Linux, vim, and build-essential, but the world's far from perfect, and that would be a lot of learning overhead for a beginner.
KermMartian wrote:
No, I'm suggesting he use a tool that's simple, lightweight


Dev-C++ is neither simple nor lightweight. Broken features does not make an IDE lightweight. Dev-C++ is a pain to setup and awkward to use, simple it isn't.

There isn't a single reason to use Dev-C++, nor should it even be implied that it is acceptable to use. There are *FAR* superior free options available that are up to date. Hell, there were *FAR* superior options available back when Dev-C++ was under active development.

Bad tool is bad - avoid avoid avoid. If it's installed, uninstall it. If you know someone still using it, slap them.
... I'm still for the original idea of Notepad++ and the build toolchain for the Prizm GCC package Laughing I think it would be best to do it this way. Maybe notepad++ isn't an IDE at all, but then again, good luck trying to reset the IDE you're using to the constantly changing GCC package every ~week or so. In this case, I don't recommend an IDE at all for Prizm development, at least if you haven't had a decent amount of experience with the IDE you plan to use.
And to repeat what Kerm said that I agree with:
Quote:
I'd really prefer he be using Linux, vim, and build-essential, but the world's far from perfect, and that would be a lot of learning overhead for a beginner.
Except, using Emacs instead of vim Smile (Or, gedit because it is newb friendly, but meh)
I would use Geany. Emacs and vim for someone who hasn't touched Linux sounds like a bad idea already... Razz

Geany is very lightweight yet very feature packed. I would consider it better than gedit on many counts. It's like a Notepad++ for Linux, only very very light (and fewer features, obviously).

If you are still staying on the Windows boat, I would take VC++ (yes, I do use this other IDE, but only because of the interest of cross platformness, but in most cases VC++ provides an abundance of documentation). Or, as Kllr may not enjoy me saying, Code::Blocks *with* MinGW. Without MinGW, you will have a semi-rough time setting up. Granted, Code::Blocks isn't as easy, and you don't have the super nice GUI editor VC++ provides. But if you're starting out cold, you'll be playing with CLI apps anyway.
Ashbad wrote:
... I'm still for the original idea of Notepad++ and the build toolchain for the Prizm GCC package 0x5 I think it would be best to do it this way. Maybe notepad++ isn't an IDE at all, but then again, good luck trying to reset the IDE you're using to the constantly changing GCC package every ~week or so. In this case, I don't recommend an IDE at all for Prizm development, at least if you haven't had a decent amount of experience with the IDE you plan to use.


If you have to mess with your IDE when you update your compiler you are using the stupidest IDE ever. For every IDE/compiler combo I know of, you set it up once and you're good to go - even across compiler updates.

Learning how to compiler and setup a project manually without an IDE is a very good thing to know how to do, though. Sometimes it just isn't worth setting up an IDE to tweak a file, or the IDE is being stupid and not working, or you are working over SSH, etc... I'm not sure if it's good to start like that or not - I think it might be. Start without an IDE to learn how everything fits together, then switch to an IDE.
Okay, after looking as you argue I have found my own opinion, I downloaded Notepad++ and I like it, but the Microsoft visual studio is still in beta form and isn't complete so I don't want to use something not completely bug free, any other compiler suggestions?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement