Tools.h++ Manual

20-4 104011 Tandem Computers Incorporated
20
20.5 Match memory models and other qualifiers
When it comes time to link your program to the Tools.h++ library, make sure
that all qualifiers and memory models match. For example, if you compiled
using the "compact" memory model, then make sure you are linking to a
library compiled with the compact memory model.
Failure to do so will result in the linker emitting mysterious "undefined
external reference" errors.
20.6 Use the capabilities of the library!
By far the most common mistake is not to use the full power of the library. If
you find yourself writing a little "helper" class, consider why you are doing it.
Or, if what you are writing is looking a little clumsy, then maybe there's a more
elegant approach. A bit of searching through the Tools.h++ manual may
uncover just the thing you're looking for!
Here's a surprisingly common example:
main(int argc, char* argv[])
{
char buffer[120];
ifstream fstr(argv[1]);
RWCString line;
while (fstr.readline(buf,sizeof(buf)) {
line = buf;
cout << line;
}
}