Solved

What going on?!

Posted on 1998-03-18
6
172 Views
Last Modified: 2010-04-10
Ok, Im using c++ for windows of borland ver. 4 on windows 95.
for some reason when i include .h file that includes in it winnt.h, like winbase.h, I get about 30 error messages from winnt.h, so i cant run the program!, is my winnt.h screwed up?! or can i do somthing to fix it?!
please help...
Yoli.
0
Comment
Question by:yolis
  • 3
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 20 total points
ID: 1183603
You should be including windows.h, which includes other include files.  Don't include the other include files dirrectly, let windows.h do it for you.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1183604
To make your program compile faster, #define WIN32_LEAN_AND_MEAN before #including <windows.h>.  If the above is defined, windows.h does not include some less commonly used include files.

0
 

Author Comment

by:yolis
ID: 1183605
But when i only include windows.h it says that it doesnt know Sleep()..
hmm anyway, illl try it again, thanx

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 22

Expert Comment

by:nietod
ID: 1183606
It should.  Does it recognize any windows API functions aor are they all undefined?
0
 

Author Comment

by:yolis
ID: 1183607
It recognizes most of of the API functions, but Sleep() it doesnt, could it be because Sleep() is a win32 function?
I am using platform of win 3.x, because when i try to use the win32 platform, it writes in the error window: BCW: cannont build using requested tools.
...please help...

0
 
LVL 22

Expert Comment

by:nietod
ID: 1183608
I can't check right now (I'll try to check later) but I'm 99% sure that Sleep() is part of the windows 3.x API.

It sounds to me like the problems is with BCW.  The requested tools might mean its compiler, linker, etc.  This is not an area I'm likely to be able to help you much in, but I'm willing to try.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now