December 2015
Beginner to intermediate
522 pages
11h 21m
English
There's no doubt that after programming for a while, the inconveniences of reading or writing to files start to quickly build up. It may not be so bad when running programs outside of your compiler, but using a relative path can be a pain while debugging, because it is no longer relative to the directory where the executable is, but instead where the .obj files are located. For the rest of this book, we will be using a function to obtain the full path to your executable, regardless of where it is or how it's being launched. Let's take a look at a new header file that will contain this function, called Utilities.h:
#pragma once #define RUNNING_WINDOWS #include <iostream> #include <string> #include <algorithm> ...
Read now
Unlock full access