Thanks a lot. You guys answered my problem :D
Type: Posts; User: disruptor108
Thanks a lot. You guys answered my problem :D
OK, true...I said I was trying to create random hex numbers, but yes...more specifically I was trying to create a random GUID for an installation program that I had created.
I was wondering...what...
I believe you're right MacGyver...
srand(time(NULL));
_tcscpy(ProductID, _T("{%8X-%4X-%4X-%4X-%12X}\n", 12345678, rand(), rand(), rand(), rand()));
_tprintf(ProductID);
Output:...
7fff
_tprintf(_T("%d",RAND_MAX));
Output: 2020380200
??? This doesn't make much sense to me...
Why do I get a 8 digit hex value when the maximum value is only 0x7FFF?
I'm trying to create a random product ID for a project I'm developing. I'm just looking to create some random hex values. However, I noticed that when I used %x with rand(), it generated 8 digit...
Hi,
I'm having some difficulty and was trying to look for some help.
I have a button in a form that will change the background color when the mouse is over the button.
However, when I load...
Thanks that worked!
Hi,
I'm trying to open a file using the following code. However, I can't figure out how to get input from the user and either convert that string to a LPCWSTR or simply read the input as a...
I found the error:
HANDLE OpenFile(char *FileName, DWORD AccessMode)
{
HANDLE FileHandle;
DWORD CreateAttribute;
CreateAttribute = (AccessMode ==...
Thanks for your help.
Alright, I'm using VS 2005 on XP, so I don't think that the IDE is the problem. Besides, when I tested opening the file and reading it without running it through the...
I get a ERROR_FILE_NOT_FOUND error. This doesn't make any sense, shouldn't I have this txt file located in the same place as my source files?
(ex. C:\...\WinParse\WinParse)
I'm trying to check the validity of a file by getting its size, but when I check for the size of this file the size is always 0xFFFFFFFF meaning that the file is invalid. I have the file in the same...
#include <stdio.h>
#include <conio.h>
int infiniteloop(int index);
int main() {
infiniteloop(0);
}
int infiniteloop(int index) {
I see what you're saying. What would be a way to check for input from the user while still looping and printing those numbers?
I'm new to C and was trying to teach myself some simple things first. I don't particularly know why this code is not performing like I would think it would:
int main() {
int ch;
int...