I have a Problum building An Exicutable as It does not find the include file.

code

#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

Error message

fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Any assistance would be appreciated in fixing this problem

Dick

Recommended Answers

All 3 Replies

1. Delete that #include line

2. Somewhere in project settings, compiler, pre-processor(?), there is an option for "precompiled headers". Turn that option off.

Ugh. If you don't know why that's ugh, you shouldn't be using it. Try this instead:

#include <iostream>

int main()
{
  std::cout<<"Hello, world!\n";
}

Thank you will see if I can find the spot to correct the problem

Dick

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.