Reputation: 1898 Grandmaster
- Active Posts:
- 5,704 (15.02 per day)
- 05-May 12
- Profile Views:
- Last Active:
- 4 minutes ago
- Viewing Forum: C and C++
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
- C/C++, C#
Posts I've Made
Posted 19 May 2013If you are still doing:
111 string number = randomNumber.Next(0, 10).ToString(); 112 return number;
Then you aren't doing anything wrong. It just happens that your test sample has been relatively small and the pseudo random number generator hasn't returned anything above 5 yet.
Posted 19 May 2013You need to just instantiate one instance of the Random class, and use that through out your entire program. That or figure out how to use a random seed for your the random number generator each time you create a new instance.
Posted 19 May 2013There are a few reasons why this could be failing for you:
1. If you are running on Windows Vista or later, you need to be running as administrator or have elevated privileges to be able to write into the HKEY_LOCAL_MACHINE key. Since you don't check your return values, or the returned registry key handle, you (and we) can't tell if that's the reason.
2. If you are compiling for for ANSI, then your call to RegSetValueEx() maybe putting the incorrect values into the registry since you are passing a UNICODE string for a REG_SZ type. Again, you don't check the return value to see if that write succeeded.
3. Your anti-virus software maybe "protecting" the HKEY_LOCAL_MACHINE hive and intercepting and throwing away your attempts to write into the hive.
Posted 19 May 2013Yikes, your gameWorld instance lives on the stack, but you are trying to delete it your PlayerObject's destructor!
A good rule of thumb is that you should only deleting things that you created. This rule can be broken and bent, but usually it is conceptually easier to follow this rule.
Posted 18 May 2013Also i disabled AVG IS 2013 while extracting so no errors popped up.
You need to tell AVG to also stop scanning while you are converting projects, compiling, or running. In short, tell it to ignore your development folders.
Here is my VC++2010 project, which include md5.h and the cryptolib itself.
The only thing I found there was was your "example" solution. It doesn't contain md5.h, nor cryptolib.
- Member Title:
- Code herder
- Age Unknown
- Birthday Unknown
- programming, shooting, skydiving, scuba, photography, game dev, cryptography, design patterns, agile methodologies, scifi, fantasy,
- Years Programming:
- Programming Languages: