0

I am using Sublime Text 3 (build 3126) with g++ on Windows 10 x64 to compile my c++. My code so far is:

#include <stdio.h>
#include <windows.h>
#include <wincrypt.h>
#include <string>
using namespace std;

int main() {
    return 0;
}

But when I compile, I get the error

wincrypt.h: No such file or directory.

I have also tried using Visual Studio 2015, but when I build it always gives me the error

Cannot open include file: 'stdio.h': No such file or directory

Any help is appreciated, thanks.

rE bOot
  • 27
  • 5
  • 1
    And how is your IDE relevant? If anything, your compiler would be more of an useful indication. Also, if you're using modern C++, then you should use `cstdio` instead, as `stdio` is the old C version. – tambre Mar 25 '17 at 13:41
  • Sorry, I didn't know what would be needed to resolve these issues as I am new to C++ – rE bOot Mar 25 '17 at 13:43
  • That said, it sounds like you don't have the Windows SDK installed (or its installation is borked). Also [`using namespace std;` is generally considered a bad practice](http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice). – tambre Mar 25 '17 at 13:45
  • I am installing Windows SDK now as we speak, I shall also stop using `using namespace std;` Thankyou for your help – rE bOot Mar 25 '17 at 13:50

0 Answers0