Why in the world?

Pages: 12
Well here it is. The simplest of simples wont compile. Im using wxDev-C++. When I try to compile this I get the message "Why in the world would you want to compile an empty project"? Mike.

#include <iostream>

int main();
int main()
{
std::cout << "Hello World!\n";
return 0;
}
Ah... The good 'ol beginner projects... I got those when i started programming, with Microsoft Visual C++, which is somewhat like wxDev-C++.

Anyway, it requires you (atleast i think so) to create a new project for every new application you're coding, and i'm guessing you have a project, without a source file.

I don't want to lure you into bad habits, and what i am going to suggest may very well be one. But i'd recommend using the regular Bloodshed Dev-C++ - even though it's rather not-updated.

It's up to the latest C98 ISO standard, and people mostly complain about it because you have to set some options to get good indendation. But i'd say it's excellent for beginners, and is still used widely in schools that teach programming.


With the regular Dev-C++, you will jsut have to create a new file, enter the code, then compile and run it. That's it, no more huzzle-buzzle needed, like with Visual studio or wxDev.

I would gladly help you with any problems you would encounter with it, that is if you decide to use it instead.

Anyway, here's the link:
http://bloodshed-dev-c.en.softonic.com/
Last edited on
Ah yes, code::blocks is also nice... It requires you to create projects for each application ( i think?) but it's relatively easier to use than wx/visual studio :>
OK. Here is my beginners observation. I enrolled on this forum Thursday. And already have noticed, at least in the beginners thread anyway, that the suggested solution to a beginers problem is to use another compiler. wxDev-C++ was recomended to me on this forum. My first program didnt work. Solution, use a different compiler. I assume that the above mentioned compilers work well (as was Dev sapose to) but I will try whatever compiler I can get help with. Oh well. So be it. Mike.
Even though I want to help you, I just can't because I don't use wxDev-C++. Your problem is more on IDE not on coding.

Most use IDEs are:
Visual C++
Code::Blocks
Dev-C++ (this is old)
And I want you to know that those mention above are not compilers but IDE (including wxWidget)


Wouldn't it be nice if you are using well known IDE, that means you get more help when need it.

Anyway this links might help
http://www.youtube.com/watch?v=x3DC7YiPBiA
http://www.youtube.com/watch?v=ybcQ04WeuUI
http://www.youtube.com/watch?v=K5HdaQ5b9cQ&feature=fvw
Dev-C++ is most user-friendly for beginners, so i'd recommend starting with it until you have some grip on the actual coding.

And like i said, i am more than happy to help with it :)
@AngelHoof
I was just like you before, I just want to learn and write code. I keep asking myself why do I have to create projects? Why no just write code and compile? I'm scared to change because I'm already familiar with my bad habits.

Dev-C++ is most user-friendly for beginners
How? Why?
Well. Let me appologize guys. I should have read the 350 page tutorial that came with the compiler. I am on page 50 and have perhaps seen the falasy of my ways. Mainly how to create a project. What I was doing was loading code from another installed compiler, namely Borland, and trying to compile and run it. After reading part of the tutorial I see how dumb that was. I will finish the 350 page book and then will try to ask more inteligent questions. Thanks all. Mike.
I've basically already made my explanation - Visual C++ (and all the alike IDE's/compilers) are faaar superior than Dev-C++ will ever be (since it will most probably not be updated).

And it would be a much better habit so start with such superior IDE's. However, this "bad" habit that one gets when using... Dev-C++ for example, does not need to be unlearnt, instead, one only has to learn the superior IDE's ways.

Dev-C++ can be thought of as an out-dated, slimmed down (very slimmed down) version of the better IDE's/compilers.

But still, all you have to do with it, is hit Ctrl+N, type in your code, Hit F9 to see if it works.

Does this make the learning curve of C++ harder? I think not.
Does it make the learning curve of C++ easier? When you're trying to learn to program, yes.

I can't say i speak for all beginners, since i am certain everyone has their way of going about when learning a new language. But as a beginner, one reads the tutorial/book (or pays attention in class) and then uses the concepts taught to make a functional program.

The most efficient way to go about this, is to use a simple IDE - such as Dev-C++.
Which enables the user to use their time efficiently.

I wouldn't care to say that dev-c++ should be used for anything more complex than the very basics of programming.

I myself use MS visual C++ 2010 express, i'm just suggesting a very easy to use and efficient solution for READ:beginners.


Edit: 350 page tutorial? Err... Well, everyone has their ways i guess. ;)
Last edited on
But still, all you have to do with it, is hit Ctrl+N, type in your code, Hit F9 to see if it works.
That's exactly how you do it in Code::Blocks except Ctrl+Shift+N
1
2
3
int main();
int main()
{


here's a simple thought, does main() need a prototype? i've never used one, but i don't know what happens when you do. i'd do a quick test but i don't have a compiler here.
no it does not, but it works with it;)...

@all others complaining about the IDE-stuff... if you find it tooooo hard to create an project or to add an code file to it. You seem to think of the world being full of morons... even if u dont get it... just click around a bit, till it works... we are humans , we got brains, we should be able to try and error... if you are too smart for it... go and get an carer...
@HolyCheeseCube
yeah works fine.
@all others complaining about the IDE-stuff... if you find it tooooo hard to create an project or to add an code file to it. You seem to think of the world being full of morons... even if u dont get it... just click around a bit, till it works... we are humans , we got brains, we should be able to try and error... if you are too smart for it... go and get an carer...


I fail to acknowledge the words of somebody trying to make me a fool - when they are:

1. Unable to comprehend simple opinions and suggestions for what they are.

2. Unable to excercise a very common language's most common grammar rules.

Oh, and:

3. Fail to prove themselves to be a more intelligent person.


@blackcoder41
sorry, i haven't used Code::Blocks. I didn't mean to lead anyone into believing that Dev-C++ is the ultimate-purpose IDE, and i certainly didn't, for what it's worth.
But you are saying , that every beginner seems to be too dumb to get a project running under an "complex" IDE...

when did I try to prove, that I am the most intelligent person in the world?:D...

I fail to acknowledge the words of somebody trying to make me a fool - when they are:

1. Unable to comprehend simple opinions and suggestions for what they are.

2. Unable to excercise a very common language's most common grammar rules.

Oh, and:

3. Fail to prove themselves to be a more intelligent person.
<- acknowledgement:P...
Last edited on
May i ask, have you/are you used/using MS Visual C++?
Relax, peoples. Go choke on the fact that Concepts were axed from C++0x, not other people's posts.

Seriously, it's not worth it. We're trying to help this guy, not lament that he couldn't find the button that when you move your cursor over says "New Project" with a button next to it that says "New File".

-Albatross
Last edited on
haha.. You really got hung up on the fact that Concepts wasn't taken out of 0x, didn't ya? ;)

Edit: Not to go off-topic...

Just go ahead and ask more questions when you feel that you need more help, mike :)
Last edited on
@besc

Well there's your problem... you're using Dev-C++... get Visual Studio.
Pages: 12