Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#include <iostream> #include "stda 1

Status
Not open for further replies.

andre123

Vendor
Joined
Sep 7, 2003
Messages
4
Location
BE
#include <iostream>
#include &quot;stdafx.h&quot;
//#include <practice.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

// The one and only application object

CWinApp theApp;

using namespace std;

/*input stream handle */
HANDLE hIn = NULL;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;

// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
_tprintf(_T(&quot;Fatal Error: MFC initialization failed\n&quot;));
nRetCode = 1;
}
else
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
}

return nRetCode;
}


gives the following error:
f:\ookbij3\days\day08\a.cpp(31) : error C2065: 'GetConsoleWindow' : undeclared identifier

in MSVC++6.0.

Does anyone knows why ?? (it's not because windows.h isn't included).

thanks.
 
#include &quot;stdafx.h&quot; must be in the first line.

also put a
#define _WIN32_WINNT 0x0500
#include <windows.h>

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Thanks for your reply, but I tried it and it still doesn't works !?
 
You may also need to download the latests Platform SDK, to update your header files, from MSDN Online.

-pete
 
try
#undef _WINDOWS_
#define _WIN32_WINNT 0x0500
#include <windows.h>

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
YES, it worked. Thanks a lot, man.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top