Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

XnavxeMiyyep

macrumors 65816
Original poster
Mar 27, 2003
1,131
4
Washington
In C++, we are working with apstrings on TC for Windows. However, the include file we use #include "apstring.cpp", does not work in Terminal for OS X. I've tried #include <apstring.h>, #include <apstring>, and various others.

Does anyone know what the equivelent header file is that would get apstrings to work? I like to avoid using VPC when possible.
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
Why do you need to include apstring.cpp? It's a rare thing that you should ever have to include anything but the header file. Compile on the command line like this:

g++ -o program_name apstring.cpp main.cpp

the order in which to put the .cpp files as arguments should be in order of number of dependencies, from fewest to most (that's why main.cpp is almost always last). That'll make your program slightly smaller and faster.

EDIT: in case all that wasn't what you're asking, I believe the line you're looking for is

#include "apstring.h"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.