| | |
Question about C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2007
Posts: 25
Reputation:
Solved Threads: 0
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.
Thanks, been wondering about this for a while.
> 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.
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.
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.
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.
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'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
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
¿umop apisdn upside down? •
•
Join Date: Sep 2006
Posts: 327
Reputation:
Solved Threads: 22
•
•
•
•
Yea but what goal are people working towards when they start with console? Do they continue to make applications in console?
Frontends are often written for console apps later.
![]() |
Similar Threads
- C command-line I/O question (C++)
- Apache Alias Directive... mod_alias question (Linux Servers and Apache)
- Completely new to C++ and have question about using char (C++)
- Question (Geeks' Lounge)
- question on cooling (Cases, Fans and Power Supplies)
- Context-sensitive grammar question :( (Computer Science)
- Welcome PC Mod Kingdom peeps! (Geeks' Lounge)
- Laptop LCD built into a car? (Monitors, Displays and Video Cards)
- Changing Network Configuration (*nix Software)
Other Threads in the C++ Forum
- Previous Thread: Borland C++
- Next Thread: C command-line I/O question
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






