CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

include file for c++ (stdafx.h)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 24, 2011, 10:53
Default include file for c++ (stdafx.h)
  #1
New Member
 
kaka
Join Date: Feb 2011
Posts: 11
Rep Power: 6
esikhatar is on a distinguished road
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
esikhatar is offline   Reply With Quote

Old   February 24, 2011, 20:23
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 369
Rep Power: 10
arjun is on a distinguished road
Quote:
Originally Posted by esikhatar View Post
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.
arjun is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Installation of OpenFOAM-1.6 on Ubuntu 9.10 marval OpenFOAM Installation 2 March 17, 2010 09:33
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


All times are GMT -4. The time now is 22:39.