Look real close at the order you include your headers, you are including your custom header before you include any of the C++/Visual Studio headers.
It should be:
1 2 3 4 5 6
|
#include <stdexcept>
#include <string>
using std::string;
#include "Convert.h"
|
Put your custom header as the last include and if you've set up your VS solution correctly to create a static library it should compile cleanly. VS 2017 Community is what I use.
With that said, /mini-rant on:
I don't use precompiled headers, so no need for that PITA
#include "stdafx.h"
.
using namespace std;
will potentially cause you problems later. Saving a couple of keystrokes now will end up giving you endless hours of unneeded conflicts when your programs get larger and you use 3rd party libraries.
If you don't want to constantly type
std::
use the more restrictive form of
using
that I, erm, used.
Personally I don't bother with
using
statements, I prefer always typing
std::
and it is a habit that doesn't require any thought.
/mini-rant off