Hi everybody!
I'm back again after some years... ;-) but here's also something I started in between:
The Gamma Pr°ject
Actually this is the first public demo, hope you'll like it.
I'd...
Type: Posts; User: Carlos
Hi everybody!
I'm back again after some years... ;-) but here's also something I started in between:
The Gamma Pr°ject
Actually this is the first public demo, hope you'll like it.
I'd...
Normally it's not allowed to distribute any files included in the SDK separately (however you might find these files somewhere).
Hint
The DirectX SDK is usually shipped with PC-magazines like...
Hi everybody!
I'd like to announce the appearance of my newest book. After finishing the C++ book last year, I decided to write another book, as there are only a few about graphics and game...
Thank you, MrWizard!
I thing there is a scaling problem: while ID3DXLine::Draw expects screen coordinates, DrawTransform works with small float values. I'm experimenting with scaling down the...
The background is not black, of course ;)
m_pd3dDevice->Clear( 0L, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,
0x00FFFFFF, 1.0f, 0L );
I managed to draw using...
Thanks, I get the math and the theory, however can't display a single line using ID3DXLine::DrawTransform...
Here's the code:
D3DXMATRIX mTransfo;...
Thank you, Bubba! I thought DirectX AppWizard sets up these matrices for me...
Hi!
I can't figure out why DrawTransform does not work for me.
While ID3DXLine::Draw draws the line as expected, I just can't manage this with DrawTransform.
Here's the code:
D3DXMATRIX...
Sorry, don't have time to analyze your code, but maybe you forgot to enable RTTI ( /GR compiler switch).
Whenever you pass an array, you pass a pointer. Regarding functionality, the function declarations below are the same:
void f( int* array_in, int size_in ); // pass a pointer - actually it...
Maybe I get you wrong, but in case your intention is saving storage space, you should also consider clustering.
Depending on the OS - more precisely file system type, the space *really* needed by a...
Normally the conversion should be legal only if you declare a one-parameter constructor which performs implicit conversions. In this case, the parameter should be of type int.
class ClassA
{...
It depends. Check your compiler's definition for NULL.
In case of VC++ 6.0 it's:
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
Again, a good example on missusing the this pointer. I've seen it in some other threads too - I think once people get the taste of this, they use it without a reason...
The same applies for...
Simply return 0 instead of NULL. As the compiler tells you, the return value is not a pointer, but an int.
Just 2 ideas:
Rational Quantify - http://www-306.ibm.com/software/rational/
Intel VTune - http://www.intel.com/software/products/vtune/index.htm
I've found at least two for loops with upper bound set to 5. Furthermore, you most probably need such a constnat, in case you iterate through a given array in more functions / code blocks.
...
> I don't recall mentioning anything about deletion.
Me neither, just listed the cases when checking for NULL pointers would have sense. When you delete and set it to NULL, then OK, check for NULL....
> for(int i=0;i<5;i++)
> GenerationsNeeded++
1.) Just a hint - there's no reason to use post-increment operator, as far you don't use the temporary returned. It should be:
for(int...
1.) Testing for NULL pointers doesn't bring too much if you don't set them to NULL after deletion.
In case of allocation problems, the (C++) standard says that operator new must throw an exception...
Oh, man, I just forgot this is the C board!!! :D
Anyway, forget C...
... do it in Assembly! ;)
Hi! I'd have another approach for this problem, starting from up above ;). I defined an Item and a Store class, and I use STL data structures and the string class for simplicity. Here's the code:
...
You (can) never assign values to a function, rather to the object returned by the function. The return values can be temporary objects (if returned by value), however, you can also return references...
In case the return value of a funtion is declared as const, it can't be used as an l-value. So, the code below won't compile :
// return value declared as const
const int getVal();
...
if(...
Thank you! The book is currently at the editor, it will be published in autumn. It will appear in hungarian, if there will be english translations, I'll let you know.