Re: Is it necessary to declare the private section of a C++ class?
On Sep 15, 10:48 am, Rune Allnor <all...@tele.ntnu.no> wrote:
On 15 Sep, 10:22, James Kanze <james.ka...@gmail.com> wrote:
On Sep 14, 1:32 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
MS Visual Studio needs - surprise... - some proprietary
stuff in addition to the standard way of doing things,
Bullshit.
If you want to play with console applications and use the
templated containers in the STL, you need to set the project
up to use precompiled headers.
Bullshit. The test programs for my Unix code all run as console
applications, and I have no idea how to use precompiled headers
with VC++ (or with any other compiler, for that matter).
Once you do that, you are forced to include a MSVS-specific
header "stdafx.h" in the .cpp files, or the compiler chokes.
My code compiles and runs without including stdafx.h. Most of
it compiles perfectly without including any Windows specific
header; it's only when I need to do system specific things (like
create a directory) that I need to include <windows.h>.
You can circumvent that by setting up a .cxx file that
includes stdafx.h and the .cpp file that contains the standard
code.
Or by just not worrying about it.
I repeat---I recently ported a large block of code developed
under Unix to Windows and VC++. I had some problems with the
makefiles, because they use the Unix toolkit in many places, and
the Unix toolkits available for Windows are all a bit flaky.
And of course, I needed to reimplement the system dependent
stuff (but that was all isolated in a few components anyway).
But except for the system dependent stuff like creating
directories, my code required absolutely no changes.
--
James Kanze