this progream must show me all the possible shuffled randomisation....but it only displays one result...i tried many ways but still doest work..isit anything with my code...check for me...plz let me know if there is any solution for this as soon as possible..thank u..
Imaging you have a dice with 100 sides each labeled with a number. If you want to make a list of all the numbers how do you proceed? One way would be keep rolling the dice and if the number you roll is not on your list you add it. This is very inefficient and non-deterministic however. A simper way would be just to inspect every side. This is similar to the problem you’re having. Using a random shuffle in a loop is not a good way to get every permutation of a sequence: although eventually it will product every combination.
Hey all im making a game for school on MFC and im having trouble making it so when I press W,A,S, or D it will move my character... I know how to make him move if I press the arrow keys (previous game):
case VK_DOWN: //IF DOWN BUTTON IS PUSHED
I have already tried VK_A, any help would be appreciated!
I create a client socket class that derived from CAsyncSocket, it connects to server ok. When server disconnects then nothing wrong, but when client side closed the connection then it's got a problem: sockcore line 482 (and 442), those lines are:
ASSERT(CAsyncSocket::LookupHandle(hSocket, bDead) != NULL);(line 482)
ASSERT(CAsyncSocket::LookupHandle(hSocket, bDead) != NULL);(line 442)
Can any one tell me why it happen and how to handle it?
When one side of a socket connection is closed the remote stack is notified and the state of the socket handle is updated. So "if" the other side calls close the handle is not in a valid state to be closed.
how to handle it?
That is up to you to determine based on the applications use model. One option is to use AsyncSelect[^] to be notified when the other socket closes the connection.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does"Christian Grausin the C# forum
Last Visit: 31-Dec-99 18:00 Last Update: 20-Jun-21 4:07