I'd just like to tell you all about a great c/c++ site - qb45.com/c/
Part of the QB45.com Network (a division of truetech).
To check out the site go to
truetech.net -> qb45.com -> C/C++...
Type: Posts; User: Donk
I'd just like to tell you all about a great c/c++ site - qb45.com/c/
Part of the QB45.com Network (a division of truetech).
To check out the site go to
truetech.net -> qb45.com -> C/C++...
There were some errors in the code... casts weren't done...(HBRUSH) & (HPEN) on SelectObject();
it's not for a c/c++ beginner, rather a competent C/C++ programmer looking to expand.
I wouldn't use 2d or 3d arrays.
Make a matrix class then have an array of class objects or use a linked list of classes....
Have an array -
int Dice[5] //5 dice in yahtzee?
Use a for loop to fill the array w/ random values
int i;
srand((unsigned)TIME(NULL));
for(i=0;i<5;i++)
{
I just figured that out about 10 mins ago. I was gonna post that I found the solution when I see that you beat me to it :D
Thanks a lot for the help.
So where am I supposed to put the (HBRUSH) type-cast?
I know how to debug, I've tried type casting everything I can think of as (HBRUSH) and then as (void*)but still get errors.
..... could you give me an example - that didn't seem to work
The following code is copied straight from a tutorial and still gives errors!!
#include "stdafx.h"
LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
int APIENTRY WinMain(HINSTANCE...