Console application worthless?

Pages: 123
hi all, i recently started programming in c++. Its kinda my first programming language, except for a single book of actionscript 2.0 in flash mx.

The book i've bought - "C++ for dummies, 7 books in 1" - i've read about 4 chapters of it, and so far it teaches me to program in console applications only. Obviously i assume this is just to learn me how the c++ language works, but as most people knows, no one pretty much uses console application. so i'm wondering - what im being taught isn't useless, is it?
I know i get to learn a new language from the bottom and i cant start out by making billion dollar projects, but i guess my question is in short -

Will i be able to transfer what i'm learning, which is programming in console applications, to more "complex" programming choices and situations?

I hope you could understand my choice of words :) english isn't my native.

Thanks for taking ur time to read and hopefully reply :)
Programming is a lot like math. Sure there are various disciplines but everything you learn somehow depends on things you learned before. Console applications are worthwhile.
I don't agree with the "start newbies with console projects" mentality. I started with MFC and had no problems. In fact I intentionally skipped over the opening chapters in the book I had that talked about console programming. I knew it wasn't what a wanted to do.

Really, once you understand the language basics, you can move on to other projects just fine. If you are interested in making games, pick up a game lib like SFML. If you want to make Widgetry programs, read up on some WinAPI tutorials or get a cross-platform widgetry lib like wxWidgets.

Basically: If you don't want to waste your time with console projects.. then don't. If you want to make other things, then start making other things.


PS: I accidentally clicked "report" when I meant to hit "reply". I hope nothing happens!
Last edited on
@Disch still, you wouldn't call them "worthless", would you?
Well no knowledge is really worthless. So no I wouldn't say it's worthless.

Is it worth your time, though? I'd say no. Not unless you're interested in making those kinds of programs.
Well thats kinda discouraging :S makes my book "rather" useless.

Well what i wanna do is mainly game programming, with a main focus on RPG games if it makes a difference. What would my approach be now then? all i know in c++ is the very basics of variables, loops, if/else statements and a slight bit of functions.

Thanks on advance for your constructive replies :)
Well what i wanna do is mainly game programming


1) get SFML: http://www.sfml-dev.org
2) Wrestle with it to get some of the sample programs compiling
3) Read the SFML tutorials
4) Start writing a simple RPG


You might be surprised how easy the above steps are (except #2, people seem to have trouble getting it set up -- so that will be the biggest hurdle).


Your book isn't completely useless. It's good for teaching C++ language topics. I would use it more as a reference for understanding things in the language, rather than as a guide to write programs you want to write.

The best and most fun way to learn is to make what you want to make. Learn the details as you go.
There are some critiques addressed to the C (like this one http://www-cs-students.stanford.edu/~blynn/c/ch07.html#_templates) and C++ for being too complex. Compared to other languages, learning C/C++ implies learning preprocessor's directives, the standard C, the C++'s OOP model and for generic programming - templates. The console application model is chosen because of simplicity, because the aim is the language, not using some technologies that require the language. Adding an overhead of complexity by using some technology may be fun if you are lucky to be genuinely interested in that technology, or may be otherwise tiring and confusing.

There is another reason. Console application "technology" is common in large extent to every platform supporting the standards of C and C++. It is a common denominator if you want, hence the logical choice for tutorials in using it. You should know that for example MFC mentioned by Disch is only a Microsoft's proprietary technology and works natively only on Windows ('98 or higher). If you learn C/C++ knitted with some other limited supported technology, you may have unpleasant surprise when deciding to use something else.
The console application model is chosen because of simplicity, because the aim is the language, not using some technologies that require the language


I've heard this argument before. I don't agree.

For one, iostream is "some technology that requires the language". So any way you slice it, you have to learn something that isn't part of the C++ language. The language itself doesn't offer any way to do IO.

Furthermore, to imply that iostream is simpler than SFML is almost laughable.

Adding an overhead of complexity by using some technology may be fun if you are lucky to be genuinely interested in that technology, or may be otherwise tiring and confusing.


You're kind of proving my point. He's interested in making games. So he should learn to make games.

If he's not interested in making console programs, learning how to program the console will be tiring and confusing.

If you learn C/C++ knitted with some other limited supported technology, you may have unpleasant surprise when deciding to use something else


As long as you can discern between the language and the library, there's no problem.

Granted I don't necessarily expect a newbie to be able to do that fully, but after he's got some experience under his belt it won't be an issue.
@Disch, my remarks were not for supporting or confronting your point. If there is something worth to be said, it should be said. It was more like a call for an acknowledgement, what would mean either of one's choices and which might be the consequences. This site, forum and these questions and answers are freely available to any one and that is why it would be important to carefully consider our choices when when it comes to writing tutorials, when we're suggesting a specific way and it's related technology (I don't really know why streams were chosen over SFML, but I guess the people who made that choice know), and as well carefully consider when it comes to writing on this forum, too.
Yeah sorry I got so defensive. XD
hm well now im really split :S disch, may i ask if u can really learn c++ by going straight to such program? i like having a book like the one i have now that i feel covers pretty much everything, even though its in console apps.

on a side note, i thought c++ is "widely known", meaning that even though im learning in console applications, the exact same language is used in more complex tecs and engines for etc games?
Oh, sure the exact same language can be used for games. It's just that you need some extra libraries for doing so.

Also, in response to your first question: It depends on where you start. If you start with SFML, then... probably!

-Albatross
Last edited on
I'd say it's better to start with something slightly more difficult that you actually enjoy than something easier which you don't like and which might cause you to stop with programming.
I have, and always will be, under the impression that working with something that you derive enjoyment out of will result if greater knowledge leaps than otherwise.

If you aren't interested in the console programming, maybe you're looking at it the wrong way, maybe you're just purely visual, or perhaps you don't understand why most books start with it. I believe that it will help you get the basic framework necessary for successful games. But I also agree with Disch, there is certainly an advantage to starting directly with graphical programming.

+1 SFML, also I've found QT pretty helpful for GUI programming.
disch, may i ask if u can really learn c++ by going straight to such program?


I did. Of course I started very small. As long as you keep your goals reasonable, it's very possible.

i like having a book like the one i have now that i feel covers pretty much everything


Yes. You should definitely keep that book. It still can teach you a lot. I don't even think you should stop reading it. My only point was that when practicing what the book teaches you, you should do it in a game-ish form instead of the console form.

Learning is easier when you can apply it to stuff you actually care about.


EDIT:

ultifinitus wrote:
I have, and always will be, under the impression that working with something that you derive enjoyment out of will result if greater knowledge leaps than otherwise.


+1 @ this
Last edited on
alright thanks a lot for the answers, its really helping.

The thing is now, i'm about to look up that sfml program, and 1 thing im kinda nervous about.
- I cant write this code for shit? :P

Since i assume the way to write this is a bit harder than just going full console programs. I guess i should just read all the tutorials on their official website, hopefully it'll get me going :)
Honestly, I'm still relatively new to C++.
I haven't tried to program outside of the console yet but what I can tell you so far is that I can create a slew of programs in the console. Utilizing the language...Some concepts are difficult to intake like pointers, and I would say get mastery of writing simple pointer programs.

Personally, I am not going to attempt coding outside of console until I myself can write a program utilizing pointers, and classes at a decent level. If you do not know what either one of those are...I suggest you buy a book, a good one I got is "C++ How to Program by Deitel".

I bought this book for 2 dollars online...It has been way more help than any online tutorial. Get one :)

- I cant write this code for shit? :P

You could work on writing *simple* programs in console with pretty code.
seerex wrote:
but as most people knows, no one pretty much uses console application.


That is so untrue that I struggle to understand the frame of mind that can suggest it. Maybe you don't use many console applications, but you are not everyone.
Last edited on
That is a HORRIBLE argument that it's not worth learning to code "console" programs. The whole idea of programming books is to teach you how to code C++, not console or window applications but the C++ programming language.

These books teach you about functions, variables, classes, structures, and so much more that are just EASIER TO LEARN using simple console programs. Because you want to learn one thing at a time, these books will teach you about how classes work, for example, and show you a simple program that uses classes.

You can use that same class in a windows program but it would look much bigger and use things that you haven't learned yet. Start with the basics and work your way up. I've only been learning C++ for about a month and I know 1000x more than before when I was just dabbling around in programs.

I want to be a game designer too but you can't just jump straight into the drivers seat. Less than one month and I fully understand classes, pointers, references, functions, variables, memory (for the most part), and so much more.

Once I finish my book and consider myself a fairly accomplished C++ programmer, then I will move on to more advanced projects. Try downloading an open source game development library and look through it, at your stage I guarantee you won't have the slightest idea how it works OR how to use it.

One step at a time, be patient.. ;)
Last edited on
Pages: 123