Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

What going on?!

Posted on 1998-03-18
6
183 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Which IDE to use to begin C++ training? 5 65
trigs fail! I thought I knew how to do trignometry 3 75
gdb doesn't stop on breakpoint 2 93
VS2015 Redefinition errors 4 68
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

839 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