death_oclock 103 Posting Whiz

There is a single arithmetic operation you can use to convert the ranges 0-89, 90-179, 180-269, 270-359 into the values 0, 1, 2, 3, respectively. The result represents the quadrant; 0 would be the first quadrant.

death_oclock 103 Posting Whiz

This program uses many outdated practices (void main, clrscr, kbhit) and should not be used as an example by anyone.

WaltP commented: So true... +15
death_oclock 103 Posting Whiz

Try using printf("Greetings, human!"); (just a guess, honestly)

death_oclock 103 Posting Whiz

Google ("c sound library") returns plenty of good results. You can find tutorials/documentation for any of them. Check out the features to find which library fits your needs best.

death_oclock 103 Posting Whiz

A good beginning sort algorithm is the Bubble Sort

death_oclock 103 Posting Whiz
death_oclock 103 Posting Whiz

Well since this is a PHP forum, i'll give you a PHP solution. You could pass the css file for the iframe to use in the url like so:

<iframe id="pframe" width="'.$game['iframewidth'].'" height="'.($game['iframeheight'] + 20).'" src="'.$path.'?style='.$style.'" frameborder="0" scrolling="no" align="middle"></iframe>

where style is the css file. In the iframe page, get this value from the $_GET superglobal and (after some error checking/security checks!!!) print the reference to this external stylesheet.

almostbob commented: Thanks Bloke, hadnt seen this approach before, way more efficient than duplicating content between domains +1
death_oclock 103 Posting Whiz

Try posting a sample file generated by your program. Off the top of my head, I can't think of anything that would cause this.

death_oclock 103 Posting Whiz

Try looking at this page.

Will Gresham commented: Brilliant link +1
death_oclock 103 Posting Whiz

When AncientDragon wrote Code[h] != 0 , his code was correct. Yours isn't. Why? AncientDragon's codes array was a string literal, which automatically has a '\0' or 0 value at the end. Your array does not. Either append a '\0' element or change your codes array to look like AncientDragon's.

death_oclock 103 Posting Whiz

The problem practically gives away what you need to do. Have you been to class at all? Taken any notes? All you need is a simple (very simple) loop, a few counters, and the basic math knowledge to perform squares and cubes. Oh, and some form of getting input (also quite simple!).

Salem commented: Makes you wonder what problems 1 to 4 were, since this is apparently #5 +29
death_oclock 103 Posting Whiz

The first parameter, hWnd (passed NULL) is the window to associate the new process with (NULL means you aren't using this feature).

The second, lpOperation, is what you want to do with the file specified in the next parameter. Here we are "open"ing it.

Speaking of which, the third is lpFile: the file you want to perform the operation on.

The fourth, lpParameters is a string of the arguments you want to pass into the new process. These are not used in this situation.

Next is lpDirectory. This is the path you want the new process to think it was started from.

Finally, we have nShowCommand: this just specifies the starting state of the window for the new process. SW_NORMAL specifies that, what do ya know, it should start in normal mode!

You can look at specifics including other possible arguments at msdn's documentation for this function.

Comatose commented: Precisely! +10
death_oclock 103 Posting Whiz

If you have an assignment to do it with a recursive function, you can't exactly do it another way and expect to get credit, can you?

The fibonacci sequence is where each successive number is the sum of the two numbers before it. A recursive function can call itself for previous states! Pass in a parameter to determine which number of the sequence to calculate. Also, remember to put "stop cases" in your function to avoid infinite recursion.

death_oclock 103 Posting Whiz

You're right, it is being used differently. In this case, it is passing the object by reference, which is just C++'s shortcut around pointers. It just means anything you do to the parameter within the method will be permanent.

death_oclock 103 Posting Whiz
<td width=""><p><?php echo wordwrap($message, 75, "<br />", true); ?></p></td>

Change 75 to whatever width you want.

serdas commented: thank you +1
death_oclock 103 Posting Whiz

It will not modify and addresses but it will set all of the values of shoe_copy to the values of shoe1. It wont call a copy constructor. I have seen this called a "shallow copy" (here)

CPPRULZ commented: EXCELLENT link +1
death_oclock 103 Posting Whiz

Put this:

if (!$user_check) {
die('Invalid query: ' . mysql_error());
}

in between this:

$user_check = mysql_query("SELECT userdb_user_name FROM default_userdb WHERE userdb_user_name='$reciever'");

and this:

$user_check = mysql_num_rows($user_check);

and tell us what is displayed.

serdas commented: many thans. you were just great and patient +1
death_oclock 103 Posting Whiz

Compress the sound beforehand, then apply the gain. Try here for some info on dynamic range compression.

StuXYZ commented: couple of nice pointers to stuff. +4
death_oclock 103 Posting Whiz

http://www.daniweb.com/forums/announcement118-2.html
If people would READ once in a while, we would all be spared a whole lot of trouble.

Aia commented: *nods* +13
Salem commented: Quite so +27
death_oclock 103 Posting Whiz

You could use the WinAPI file functions (http://msdn2.microsoft.com/en-us/library/aa364232(VS.85).aspx) which allow you to set sharing permissions (as well as other flags and such for the sort of thing you described).

death_oclock 103 Posting Whiz

He didn't mean you should change it to 0, he meant thats what your code equated to. He meant you should either set or prompt for a product number. The first product in the display is still zero because you started your loops at 1, therefore skipping the 0th element of the array (the one that actually had a value). This is also why there are only 6 days in the week and 4 products.