Hello, I was wondering about something. Whats the point of learning console programming (The black screen that comes up) when Win32 or another windows api has completely different syntax. Eventually the person will want to make an actual windows application so what would be the point of learning console first. Shouldn't they just start with win32 or another api?
Thanks, been wondering about this for a while.

Recommended Answers

All 8 Replies

Member Avatar for iamthwee

Yes I agree, if that is your ultimate goal, but it is not everyones' - so no your point is invalid.

Yea but what goal are people working towards when they start with console? Do they continue to make applications in console?

Yes... such applications are still made.

And no, the syntax doesn't change. The paradigm may change... All GUI programs (well... all good ones ;) ) are event-driven. Console programs tend to be imperative (though many good ones are also event-driven).

The goal is to learn to properly use the language. That can be done in any UI environment, so for beginners it is usually easier to leave out all the overhead required to make GUI programs and stick to the C++ language itself instead of dinking around with external libraries.

There is no reason why you can't start with GUI programs though... Proper use and good design is important either way.

> Do they continue to make applications in console?
Sure, all the time.

Console is perfect for testing out code ideas to make sure they'll work before you bury it inside several 1000 lines of GUI code which will just get in the way otherwise.

Many tools are essentially command line tools with a GUI stuck on the front end. Except nowadays, the command line is labelled "expert mode". Your compiler for example.

As well as being simple, it's also highly portable. It takes almost no effort to move a console program from one system to another.

> when Win32 or another windows api has completely different syntax.
The APIs change, not the syntax.
Learn C++ (the language)
Learn about the STL
Learn about boost
Then learn about the APIs relevant to your OS / Compiler.

> Shouldn't they just start with win32 or another api?
My analogy - learn to drive, then choose your car.

As others have said - there is no change in syntax when using an API. You need to learn about C++ before you learn how to perform specific output with it (ie, a GUI). However, its very difficult to learn C++ when you have no means of outputting data. That's why you do console apps. It's very easy to perform simple I/O with the cin and cout objects.

I'd be willing to bet that the vast majority of C++ developers rarely touch the Windows API directly. Even if you limit that group to just those who even develop applications for Windows platforms, much of the time the Windows GUI code is likely to be wrapped up in several layers of libraries which support the basic structure of the application, or even written using another language altogether

Yea but what goal are people working towards when they start with console? Do they continue to make applications in console?

Some programs don't need human interaction directly. Just look at some of the programs that make up the software installed on your computer, or belong to your OS.
Frontends are often written for console apps later.

i dont know to you... i adviced,, you better to study hard... did you get it??? c++ is a very easy programming language you must know it ha!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.