CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   include file for c++ (stdafx.h) (https://www.cfd-online.com/Forums/main/85402-include-file-c-stdafx-h.html)

esikhatar February 24, 2011 09:53

include file for c++ (stdafx.h)
 
Dear everybody
please send me include file "stdafx.h".
i have a *.cpp code and install Microsoft visual studio 2008, but when i debug my code, this error is appeared:
Error 1 fatal error C1083: Cannot open include file: 'stdafx.h'

help me, thanks
my email address: zztnshn_2@yahoo.com

arjun February 24, 2011 19:23

Quote:

Originally Posted by esikhatar (Post 296749)
Dear everybody
please send me include file "stdafx.h".
i have a *.cpp code and install Microsoft visual studio 2008, but when i debug my code, this error is appeared:
Error 1 fatal error C1083: Cannot open include file: 'stdafx.h'

help me, thanks
my email address: zztnshn_2@yahoo.com


just comment that part out.

This is how stdafx.h looks like:

----------------------------------

#if !defined(AFX_STDAFX_H__D202CA61_8EBC_4399_BDE3_0FE F47C97EE9__INCLUDED_)
#define AFX_STDAFX_H__D202CA61_8EBC_4399_BDE3_0FEF47C97EE9 __INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

#include <stdio.h>

// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__D202CA61_8EBC_4399_BDE3_0FE F47C97EE9__INCLUDED_)
---------------------------


all it is doing is

#include <stdio.h>


so comment that part and put this there. Should work.


All times are GMT -4. The time now is 04:17.