3.3.3 Borland C++ 4.5 DOS- and WINDOWS-programs
For programs written in Borland C++ 4.5 all information given
in sections 3.3.1 and 3.3.2
can be applied but there are some further points:
- The first include file has to be <classlib\defs.h>,
because there Borland C++ defines its bool type.
- Then, all STL include files have to be included (before any
Borland C++ include files).
- Note, that the line numbers of operators that have to be commented
out by a #define __USE_STL directive in the include files
<cstring.h> and <classlib\alloctr.h>
are not the same as given in section 3.3.1
for the appropriate Borland C++ 4.0 include files.
- A further operator has to be excluded by a #define __USE_STL
directive in the include file <owl\bitset.h> (found
at the end of the include file), if it is used.
DOS-example (analogous for Windows):
#define __MINMAX_DEFINED // use STL's generic min and max templates
#define __USE_STL // exclude BC++'s redundant operator definitions
#include <classlib\defs.h> // use BC++4.5 bool definition
// STL include files
#include "vector.h"
// C++ standard include files
#include <stdlib.h>
#include <cstring.h>
#include <classlib\alloctr.h>
#include <owl\bitset.h>
#include <iostream.h>
void main (void)
{
vector<int> v(1, 4);
cout << v[0];
}
Continue with section 4.1
Back to index
Johannes Weidl
(J.Weidl@infosys.tuwien.ac.at)
- Apr 16, 1996