Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help in C

Name: Anonymous 2012-04-09 0:47

I need to execute certain commands depending on what the value of a string is. Instead of making a lot of if statements to check the string against all possible cases I thought I would hah the strings and hash the possible values for the string for which i want to do something then handle it with a switch statement. The number of different strings I'll be comparing it to is less than 100 so i dont have to worry about collisions. Is this a good idea? Do you have other ideas?

Name: Anonymous 2012-04-10 3:24

>>13

>So is bubble sort.

Using qsort and bsearch on an array of structs like this is trivial and scales to the moon.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List