1

Recently I bought The Complete Reference C++, fourth edition by Herbert Schildt. On the third page of the book, I encountered a heading, "If you're using windows". It says:

If your computer uses windows, then you have chosen the right language. C++ is completely at home with Windows programming. However, none of the programs in this book are windows programs. Instead, they are console-based programs. The reason for this is easy to understand: windows programs are, by their nature, large and complex. The overhead required to create even minimal windows skeletal program is 50 to 70 lines of code. To write windows programs that demonstrate the features of C++ would require hundreds of lines of code each. Put simply, Windows is not an appropriate environment in which to discuss the features of a programing language. However, you can still use a windows-based complier to compile the programs in this book because the compiler will automatically create a console session im which to execute your program.

I don't understand at all if this paragraph means I should use windows or some other OS... can someone simplify this for me?

2
  • FYI, read upon on reviews of Herbert Schildt books, not many are good. Search the internet for "C++ review herbert schildt". Commented Mar 25, 2018 at 16:58
  • It says 4/5 rating for the book...I have bought 4th edition of Complete Reference Herbert Schildt yesterday only, I have good knowledge of C89 and C++89 but I wanna update to C++14, is the book good for this purpose? Which book do you recommend for the purpose? Commented Mar 25, 2018 at 20:37

4 Answers 4

4

The author is saying that, yes, you can use a Windows-based compiler for all of the programs in his book. However, don't expect any fancy graphical interfaces because they significantly increase the complexity of the required code.

Sign up to request clarification or add additional context in comments.

Comments

2

You can use Visual Studio IDE for creating C++ programs for Windows that uses Visual C++ compiler and also you can use GNU Compiler with Cygwin or MinGW on Windows to compile C++ programs. Microsoft provides a Win32 API for system specific calls, I think writer points that because it is an extra overhead for new learners of C++. We've used Visual Studio with Visual C++ compiler when we were learning object oriented programming with C++ in my school since laboratories had computers with Windows installed on them. But also, in other courses we generally used C language, we used Linux and GCC to compile our other C/C++ projects. For simple projects C/C++ doesn't depend on system and you can use whatever you want while learning. I would suggest GCC on Linux (with VirtualBox if you have Windows), it will also help you to understand how compiler and linkers work. Console programs are general for simple tasks such as printf() so they are system independent. If you want to learn system specific tasks, like multi-process programming, you would select a target system and work for it.

4 Comments

Why are you recommending linux (using virtual box) over windows when using any os is all the same, as people say. I'm just curious, please explain if possible..
@RisingUnderDog Generally people on Windows development environment, use Visual Studio IDE and it is great, but for starters it hides many things and handles them automatically. But on Linux, you can create programs without using any kind of IDE and work on parameters of GCC and I think that would be helpful to understand how compilers and linkers work. You can still work without IDE on Windows for C++ programming but finding help when you encounter a problem would be a little harder since generally people prefer Visual Studio.
I have already worked in TurboC++ IDE. Would it be good if I work on codeblocks or netbeans or Visual Studio? I have a pretty fair knowledge of C++89 and currently I'm working on to upgrade myself to C++14 standard. What would you suggest me?
I didn't use Turbo IDE, so I don't know similarities but if you have Windows, Visual Studio would be best with IntelliSense capabilities, and in latest version you can connect to a Linux machine over network for Linux development, but if you want to change your working environment frequently, switching OSes etc, I would suggest the other two.
2

It does not really matter which OS you use, as most C++ programs are cross-platform. I think the author of the book means that Windows is a good operating system because he thinks WinAPI is great for C++. You should not really worry about that paragraph, especially not when you are learning. Just use whatever OS you are most comfortable with.

Comments

1

The author suggests that the C++ programs provided in that book can be compiled on other Operating Systems as well, since they do not use OS specific commands. If I were you, I would ignore that paragraph for now, since all it says is "you can compile and run the programs in any OS, not just windows".

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.