> Usually, books deal with console apps to learn the actual language
Well the good ones do, because they're trying to teach the language and not an API.
If you thought Win32 GUI programs were hard, then try a Win32 service, or a Win32 device driver. To really step it up, forget Win32 and try something embedded without a debugger or an OS to help you.
For me, Win32 GUI is only hard because the API is vast, not difficult to comprehend. The last time I used it, most of the time seemed to be spent RTFM to find out what bit of the API was responsible for what I wanted to do next.
> How many c++ programming exist?
> I thought there were two, either console or windows application.
Lots and lots, and not just constrained to Microsoft either.
GUI programming could be performed on
- Windows (several APIs, such as Win32, wxwidgets, others
- Linux ( GTK, Qt, Others)
- Macintosh
- Amiga
- Palm, and other hand-held devices
- Mobile Phones (Endless variety of bespoke GUIs here)
- Game consoles
- Set top boxes
Then there's lots of other kinds of programming which isn't GUI related at all.
Then there's all the different application 'domains' which might interest you, whether its embedded C for mobile phones (what I do), or writing office applications for Microsoft.
The point is, once you know how to program, and the core language, you're in a room with many many doors. If Win32 GUI is your thing, then fine, but it's far from being your only choice.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Laserlight was mentioning two programming languages. Win32 or console apps is type of application. There's C, C++, C++ .NET, C#, Java, J#, Pascal, Delphi, VB, VB .NET, and probably more I'm forgetting here. You can do GUI applications with most of them, but you can also do "console apps" with most of them.
They're just different languages, but they can all create applications with or without GUI.
I'm sure you'll disagree less, though. But we also have a right to disagree, so tell me your thoughts! I might have missed something.
I am sry if this is a bit late but earlier starlight said "dev-C++ is not a compiler" can someone please explain this to me. It seems to have all the attributes of a compiler. Another thing is that someone said "all the compilers can compile into executables" sorry but I just started C++ and in other languages they dont.
Dev-C++ is an IDE, which uses a compiler known as mingw or something IIRC.
All C/C++ compilers compiles the code and creates an executable. It later attaches the executable to a debugging session to debug your code, unlike some other programming languages (VB comes to mind) that runs the code directly in the IDE w/o creating an executable first.
sry for all the probably stupid questions like I said I am really newbie but wat is an IIRC I have never heard of that. I am probably wrong on this but is the IIRC the thing that actually compiles the program and the IDE runs it?
Next time google it.
http://www.google.com/search?q=IIRC
Since Elysia isn't talking about Interactive Illinois Report Card's, which happens to be the first hit, the second one is probably what you want [http://acronyms.thefreedictionary.com/IIRC].
Hint: If I recall/remember correctly.
IIRC = If I Remember Correctly.
IDE = Integrated Development Environment. A fancy way of saying Editor / Compiler / Debugger / Help system which know about each other.
The compiler compiles (turns a source (.c) file into an object (.o) file)
The linker produces the executable, by combining your .o files, with various libraries.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support Laserlight's point. Some programmers work in console-based environments because they don't see the need to work in a graphical environment. Hell, the best coder I know has never programmed in a graphical environment and yet nobody can doubt he is a guru in programming !
=)
Never said there was no cause for using console approach, but it's mostly for CLI-type applications and newbies (note the word mostly). There aren't many more frequent uses for console-based apps.
Even if you don't need a graphical interface, you don't use console-type because it pops up a console window every time you run it. If you don't need an interface, you don't really need a console either, so a non-console app project would be used and no GUI created.
How about a broadsweeping statement that says that GUI programs are only created for stupid users that don't know how to use a computer without using the mouse that is glued to their hands?
Or for applications that do not need the bloat of the Win32 GUI nor it's functionality or lack thereof. CLI and console have nothing to do with each other but it would be a good way to learn it.Console apps are mostly for beginners and for CLI-type apps.
Console apps are very nice for servers which require little GUI or other applications that you need to get up and running quickly.
Depends on whether you think CLI stands for Common Language Interface or Command Line Interface. Curse MS for reusing existing abbreviations.CLI and console have nothing to do with each other
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I don't agree with that. If that statement was true, we'd still be using plain ol' DOS.
No. Pretty GUI and interfaces is what we want and actually simplifies a lot and require that we don't have to read a 50-page documentation to understand how to use it and 30 more days to understand what switches must be used and how they interact with each other.
Here's another analogy: would you rather have a big keyboard glues to all of those machines other there, like copy machines, to type "copy 5x double-sided --quality: best" or just press a few buttons to get it done?
I think this discussion is going nowhere.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law