|
Zac Howland wrote: I do hope you realize the irony of this statement.
Yes. I'm a bit of a smart ass sometimes.
Zac Howland wrote: Many times, it takes one far more time to "workaround" an issue than it does to do things the correct way.
Unless the compiler is flawed, and won't let you do it the correct way, then you have to work around it, or take a different approach.
Zac Howland wrote: GCC is far easier to use from the command line than Microsoft's compiler.
No doubt, but I like hitting F7.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Steve Echols wrote: No doubt, but I like hitting F7.
As long as you realize that you are spoiled, I guess there is no problem with it
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
sunit5 wrote: try it on gcc compiler . I prefer open source product
gcc is pretty much OK, but the debugger (gdb) sucks.
|
|
|
|
|
Steve Echols wrote: I've always heard that VC6 is a crappy compiler and isn't up to standards
At the time of its release, it was almost 95% compliant with the standards. At the time, that was the highest of any compiler out there. There is a reason that VC6 is still widely used for Windows development.
That said, when dealing with templates, you have to be very careful with any compiler. they are all rather picky about them.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: At the time of its release, it was almost 95% compliant with the standards. At the time, that was the highest of any compiler out there. There is a reason that VC6 is still widely used for Windows development.
I've been using MSVC, since they first came out with it, and have always loved it. I've just heard other people saying how it isn't compliant, etc, etc, but I've never had a problem with it until this. Guess I'm really pushing the edge of the envelope now!
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Not that I like to defend Microsoft for anything ... but in their defense, almost every compiler has problems with templates. That is an area of the standard that wreaks havok on every single compiler I've used (MSVC, Intel, GCC, Borland).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi all,
I have to compare two double values, say x and y. I compared using this simple method x < y, but the result seems to be varying in different cases. Sometimes eventhough x and y are equal, the output may be x is less than y and viceversa,
So Please help me to have a good method for comparison of double values.
Thanks in Advance
Velayudhan
|
|
|
|
|
can you show the values you are comparing,
code you you are using.
|
|
|
|
|
|
|
When comparing floating point/double values, you should pick some small value and compare the difference of your two values to that value. For example:
double x = 3.14159265;
double y = 3.141592654;
const double epsilon = 0.00001;
bool IsEqualTo(double x, double y, double epsilon)
{
return (abs(x - y) < epsilon);
}
bool test = IsEqualTo(x, y, epsilon);
Small differences in precision can creep up when doing math with floats and doubles. Comparing their difference with some small value allows you to control which precision is important to you.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
hi ,
does anybody know why this thing happen ?
i needed to keep thread count of an application to 2 and i found that when i'm calling CoCreateInstance it creates a thread internally..
do u know whats the reason ?
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Hi All,
I wrote a Shell Extension for context menu..
I inserted my menu item and assigned a bitmap to it..
But if mouse hovers my item the color of the bitmap is inverted, how can i avoid this??
Do your Duty and Don't expect the Result
|
|
|
|
|
Any links or articles regarding this will also helpful
Do your Duty and Don't expect the Result
|
|
|
|
|
|
Hi Whitesky,
Thanks, but those articles talk about owner draw menu..
But in my case i can't draw the menu..
I'm implementing IContextMenu...
So, i have control over menu only in IContextMenu::QueryContextMenu...
Do your Duty and Don't expect the Result
|
|
|
|
|
Hi,
Please tell me how to plot a single dot in directx with mode 320x200. i have to plot hundreds of dots to form a figure. all the examples about directx programming tackles almost "loading" a bitmap then animating it.
e.g. drawing letter "A" using only the pixels meaning drawing each pixels(with respective x and y coordinates) until you will form the letter "A".
"We are all the same in different ways" Kuroro Rucilful
|
|
|
|
|
You can achieve that without using DirectX. You can just use GDI or GDI+. However, if you want to use DirectX (Direct3D), you can do that. Just create a direct3d surface, and when you want to access the individual pixel, call GetBackBuffer(), which returns a pointer to the buffer array (in a structure). You can access each pixel, and change it as you like.
|
|
|
|
|
|
Hi everyone,
This is a sample program in pascal with the aid of a little assembly. Assume that Mode 13h is being made before this line of code by INT 10H.
Does DirectDraw has this some sort of function?
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Writes a pixel dot of a specified color at a specified screen
coordinate.
On entry: AH 0Ch
AL Pixel color
CX Horizontal position of pixel
DX Vertical position of pixel
BH Display page number (graphics modes with more
than 1 page)
Returns: None
Registers destroyed: AX, SP, BP, SI, DI
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
As seen from our SetMCGA example, you would write this by doing the following:
Procedure INTPutpixel (X,Y : Integer; Col : Byte);
BEGIN
asm
mov ah,0Ch
mov al,[col]
mov cx,[x]
mov dx,[y]
mov bx,[1]
int 10h
end;END;
"We are all the same in different ways" Kuroro Rucilful
|
|
|
|
|
|
Sounds kind of trivial. Perhaps your teacher can't speak English, but given how easy that info is to find using google ( or even by reading articles on this site ), I doubt that's really the core problem.
You've understood the question, because I can understand what you've typed. Now refer to your reference books, or google.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
eh... the only reason i understood the assignment was because he gave it to us on paper. I'm just not understanding how to write the code. it's the planning i have the problem with.
AFTER i see the code done correctly i understand it. I can debug till the end of time and do that right. it's actually sitting down to write it that i have a problem with
|
|
|
|
|
GameDesignerXIX wrote: it's actually sitting down to write it that i have a problem with
Plainly. That, and using google.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|