#include #include #include using namespace std; #define DEG_PER_RAD 180/M_PI void myStuff(string progDir) { cout << endl << "Hey there, world." << endl; cout << "Our program directory is:\n" << progDir << endl; float theta = atan(40.0/10); cout << "The angle from the origin to (10,40) is: " << (theta*DEG_PER_RAD) << " degrees." << endl; } int main(int argc, char *argv[]) { // Get program directory string programDir = argv[0]; // This might have to change for Linux ('/' instead of '\\') programDir = programDir.substr(0, programDir.find_last_of('\\') + 1); // Seed random number generator srand(time(NULL)); // Do whatever we want myStuff(programDir); getchar(); return 0; }