|
Adding those two lines would make the program work if you had one of the commercial Borland compilers. With any of the commercial versions you get a utility called IMPLIB that you would use to tell the compiler how to link to the functions in inpout32.dll. Since the free version 5.5 doesn't come with any utilities, you have to go through a more-complex technique of dynamically loading inpout32.dll.
That's why Test2.c is so much more complicated than your example; somewhere in there you'll see a call to the Win32 LoadLibrary() function, which is the heart of the dynamic loading technique. Though, as you can see in there, there are a lot of housekeeping details to take care of.
So, I think you have two choices:
1. Try compiling Test2.c, and if that's successful, study it until you understand it well enough to modify for your purposes.
2. Buy a commercial Borland or Microsoft compiler so you can use the simpler code you posted in your message. Another alternative might be the free Open Watcom[^] compiler, if it happens to come with an IMPLIB utility.
Good luck!
|
|
|
|
|
OK! I think i would go for Microsoft VC++ compiler because my college has it! I think that would be more easier right?
Thanks for your advice
|
|
|
|
|
Sure, that sounds reasonable. Just make sure it has the IMPLIB utility -- I don't think Visual C++ 2005 Express Edition has it, but I think all the other editions (and other years' editions) do have it.
|
|
|
|
|
Hello Every One
I need your help to make a programm in C++
The program convert the dicemal numbers to binary using Recursion ..
I hope That you can help me ..
Waiting for you ..
|
|
|
|
|
There is no decimal or binary numbers. This is just a language misuse. A number is a number and is independent of its representation which can be decimal, hexadecimal, binary, ...
A small example (yup, for thos who know, it's still the good one with the apples ). So, let's say you have 21 apples on a table, you can say "I have 21 apples", or "I have 0x15 apples" or "I have 0b10101 apples". You still have the same number of apples on your table, no matter which representation you use.
So, your question make as much sense as asking "I want to convert my 21 apples in binary, how to do that ?"
So, what you want to do exactly ? Converting a number into a string in binary or what ?
|
|
|
|
|
is it me, or we are repeating ourselves these days ?!
|
|
|
|
|
I don't know why but I have exactly the same feeling
I think I will make a standard post and make a copy-paste each time. Maybe with some variations: instead of apples I can choose bananas, pears, oranges and why not fishes ?
|
|
|
|
|
i am personnaly getting a bit bored and am thinking of storing a link of a good answer on the subject, then only paste it as a reply...
especially when the question is asked in the wrong forum
|
|
|
|
|
Thaaaaaanx alot every body for your replies
and I hope find answer for my quistion
Iam Sorry if I put my quistion in the wrong forum
but Iam new user
....still waiting for your help....
|
|
|
|
|
Thanx alot for your explain
now I undestand the difference
ofcourse I mean convert the decimal numbuer to a binary string
So .. can any body help me??
|
|
|
|
|
Take a look at _ltoa[^] function. It will convert a number into a string and you can specify the base of the value (2 in your case).
|
|
|
|
|
see this code .. try to apply it
Iam very happy .. Thanx alot for your helping
let's see the code .. if you have any guestion I will help you
#include <iostream.h><br />
#include <conio.h><br />
<br />
void convert(int i) {<br />
if(i > 0) {<br />
convert(i/2);<br />
cout << i %2;<br />
}<br />
}<br />
int main() {<br />
int a;<br />
cout<< "Please Enter The Number That You Want To Convert >> \t";<br />
cin >> a;<br />
convert(a);<br />
getch();<br />
return 0;<br />
}
|
|
|
|
|
Ouch, sorry, I forgot that you wanted to do with recursion (is it a homework BTW ?)
Yup, I think this will work (didn't check it in detail but it looks correct).
|
|
|
|
|
any way .. thanx thanx thanx for your helping ..
you are a good teacher and intellegent one ..
I hope that this code will be usefull for every body in this website ..
See You
|
|
|
|
|
I got
remoteAccess error LNK2019: unresolved external symbol __imp__AlphaBlend@44 referenced in function _WinMain@16
when I use AlphaBlend api, I included windows.h in my source code and I can use other windows api without any problem ( I can use BitBlt too which I assume it located in the same dll as AlphaBlend, gdi32.dll)
|
|
|
|
|
|
resolved, thanks, FAQ is useful
|
|
|
|
|
plz tell me something about how to get L2 CACHE SIZE AND SPEED of any system in Visual C++ ....
Plz send me exact code for that
Thanking You.
Sincerely,
VIRAL PATEL
|
|
|
|
|
Before I answer, answer me this: why would you need such information? What are you doing?
-- modified at 11:48 Thursday 9th March, 2006
|
|
|
|
|
Please help me somebody..im not good in programming..
i really need someone help to guide me please i need to design an abstract data structure to represent matrices then i have to overload the *, + and - operator so that they perform the correct operation accordingly for matrices. My friends said that i have to use the two dimensional arrays but then i still can figure out i have to implement a two dimensional dynamic array to represent the matrix. This is the following code that shows me on how to define a two dimensional
dynamic array of any size (in the example below the size is 2 by 2):
int **matrix;
int rows = 2;
int cols = 2;
matrix = new int *[rows];
for(int i=0; i
|
|
|
|
|
Check out matrix TCL Lite[^].
It is a relatively simple matrix implementation. There are more complicated better performing libraries out there, but they aren't easy to learn from.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
Paranoiana wrote: But then i still cant get it how to do it..im really bad in programming..but i really want to learn it..please help anybody thank u
Try this: The Matrix and Quaternion FAQ[^]
Although you can start with a library, you might be better off starting here, learning how and why they both work, and what they can-be/are used for. Plus it is excellent reading on the quaternions too (I use quaternions as often as possible myself). Once you understand how and why they work, and what purposes to use them for, then you can pick your favorite matrix library/class and go from there.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
USING Visual C++ .Net
I want to design a class to represent a day’s bookings in an appointment book.
This class should hold the day’s date and an array to represent each hour of
the day for which an appointment can be made (say nine entries, representing 9.00 to 17.00 ).
Each element of the array only needs to be able to indicate whether that hour is booked or not.
the above class should include the following methods:
- prompt for and accept the day’s date
- initialise all the hours in the day to “free”
- repeatedly prompt the user for an hour number
- if the hour is “free” mark it as “booked”
- otherwise tell the user “already booked”
- display the day and its appointments
e.g.
20/12/05
9 booked
10
11 booked
12 booked
13 booked
14
15
16 booked
17
thanks in advance.
|
|
|
|
|
Ok, I understood what do you want to do, but where have you been stucked? What is the question / the problem you have?
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
He wants you to write the class for him for his school homework.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|