this algorithm should work
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10
1 + 1 + 1 = 11
from http://www.allaboutcircuits.com/vol_4/chpt_2/2.
Type: Posts; User: pYro
this algorithm should work
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10
1 + 1 + 1 = 11
from http://www.allaboutcircuits.com/vol_4/chpt_2/2.
no worries :), stumped me too for a bit; so was good to find a solution.
gotit, GetMessage returns -1 after window close, in the loop check for getmessage error like msdn example
// Message Loop
BOOL b_Ret = FALSE;
while( ( b_Ret =...
Check the return value of GetMessage or take a look at PeekMessage, Strange the window messgaes look fine, can you verify that WM_DESTROY is being called.
WNDCLASS should be fine msdn states: "You...
++ has higher precedence than *, both t++ increment the pointer. Is this your intention
the message loop is provided by the DialogBox function, if you use CreateDialog ( modeless ) you will be using your own message loop. yes you can create a memory block and put a DLGTEMPLATE first...
you are right, you only should need a separate class for windows that require different class styles n such, not window styles. However for simple windows like about boxes, you can use a modal dialog...
yes that is far simpler, but if the user of your app has not installed IE past a certain version, the shell lightweight API may be missing and it has a terrible overhead for dependencies as it...
RegCreateKeyEx, RegSetValueEx Function's. These aren't the easiest of API for a beginner to use. Search around for examples and keep an eye out for a registry wrapper class, there are a few I have...
yes, msdn says
when the window is minimised it wont have keyboard focus, you can use a hook to capture the keyboard information SetWindowsHookEx Function, Using Hooks
still need to declare a variable
double *x = new double[ 200 ]; no data type sets x to an int/undefined?? and sizeof(x) is returning 4 most probably ( 32 bits ) or 8 for 64-bit OS
If a window has been created it will still receive messages while inactive, minimised, hidden.
yes you are using it wrong, 6 || 9 equals true. If you are comparing answer to either 6 or 9 you need to do each comparison seperatly
( answer == 6 ) || ( answer == 9 )
look up operator...
The console is limited to the maximum width of chars in its properties. This is restricted to modification with the mouse and explains why the window will resize to a certain extent then stop....
const int GetByte(void* i, unsigned char byte)
{
return ( ( char* ) i )[ byte ];
}
you are taking the void* and using its address '&i' rather than i itself
in your header files add
#pragma once this will prevent multiple declarations. A result of multiple declaration is the compilation unit being dropped and data objects declared following the...
someString is one thing, and you are explicitly specifying its definition twice.
try
template< typename T > std::string ContainerClass< T >::someString = std::string("test");
if you use a...
you cannot define a callback in a 'MyWindow' class and use it with a windows system because the callback is a function of type 'MyWindow::WndProc' and windows has no way of knowing what the...
What sort of project type are you using, a win32, .net, or managed. I only use win32 projects, but that looks like it is using some interface related stuff, i.e. COM objects. But an undefined error...
you need to assign data to newtime.
not sure what your intentions were for the sprintf call.
<code>
newtime[ 0 ] = 'a';
newtime[ 1 ] = 'b';
newtime[ 2 ] = 'c';
</code>
rags_to_riches is right, also I didn't read the code but I noticed an abundance of 'random2 == ??'. Use arrays with loops. When it comes time to update this code adding even a single case to random2...
goto statements are fine except they are evil. People are pressuring C++ standard boards ( IEEE 'n' stuff ) to remove it from the language as it is considered an illogical statement as it causes an...