Well, this relates back to my URL finder....
Code:
fp1 = fopen(filepath, "rb");
fread(html, sizeof(char), SIZE, fp1);
for (State = NOT_INURL; c = html[i]; i++)
{
if (c == '\"')
{
count++;
State = !State;
continue;
}
if (State == INURL)
{
url[b][d] = c;
printf("%c", url[b][d]);
d++;
}
if (count == 2)
{
url[b][d] = '\0';
counter++;
printf("\n");
b++;
count = 0;
}
}
fclose(fp1);
seedrnd();
x = rnd(counter);
printf("x is equal to %d which was %s\n", x, url[x]);
As you can see, it just finds a random index and and prints it. Don't worry about the other functions like rnd() and and variables like counter. I take it that I am putting the characters into the array wrong or something. The url array is [150][512]. the value of url[x] is equal to a bunch of junk/null characters, the string, and the null terminator, all concatated into one.