What is meant by this line

Started by
6 comments, last by Seraphim 18 years, 11 months ago
Quote: Programming Windows 5E Second, you should know C. If you don't know C, Windows programming is probably not a good place to start. I recommend that you learn C in a character-mode environment such as that offered under the Windows 98 MS-DOS Command Prompt window
What is a character mode environment? Is he talking about edit? Or saying dont use IDEs and compile yourself?
Advertisement
I think what is meant is try to build an application that runs in text mode (i.e. dos box, prompt, etc) instead of one with a window (like most modern windows applications). Creating the window and programming for such GUI applications is more complicated than plain (old) console programs.

Greetz,

Illco
The book is about windows programming though, you cant create windows unless you use the windows API, right? ;

That confuses me that he says learn it in command prompt, as opposed to what?
He says to learn C by using console-mode applications. Then, once you are sufficiently comfortable with the C language, you can move on to learning Windows programming using C.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
Like Edit?
I think he's saying that if you don't know any C, it's best to learn it through making console apps instead of actual windows apps. The code to get a console app going is only a few lines... to create even a basic window takes a few pages it seems.

[EDIT] You can still use MS Visual Studio (if that's what you're using...) or something similar, just create a "console" app instead of a windows app... He doesn't mean you have to program in DOS, just make a DOS program.[/EDIT]
Additionally, a console-mode program built on modern compilers will still probably be quite capable of getting access to the Windows API, and will thus still be capable of create windows and doing all the Windows programming stuff. The primary difference between a console-mode program and a play Windows program is that the Windows program does very little for you. You start with just a few parameters (such as the command line parameters). You are then responsible for creating and displaying any windows. The console-mode program on the other hand automatically creates a console window for you (if you didn't already run the program from a console window), and sets I/O so that functions like printf() and scanf() (or C++'s objects cin and cout) interact with the console. It basically sets up a simplified environment for you to work in, so that you don't have the burden of setting it all up yourself.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
I'd say he suggests to learn C without an IDE, that is do the compiling yourself and type in a normal text editor (UltraEdit is a good one on windows).
I have seen many people learning Java with an IDE and after a year they still don't know what 'compiling' means..

Besides that, unless you really want to learn C, skip it and continue on with proper C++. Learning C first will make learning OOP (Object Oriented Programming) much harder IMO.

edit:
After reading it again, the above posters are probably right with their interpretation. I'd still suggest learning how to program without an IDE though.

This topic is closed to new replies.

Advertisement