In deck_shuffle() it should be: for (int i = 51; i > 0; --i)
If you are under no pressure to do this particular task, you may want to get a book or find a tutorial online and learn more about function...
Low-level:void split_addr (char *ip_port, char *ip, char *port) { while (*ip_port && *ip_port != ':') *ip++ = *ip_port++; *ip...
I'm assuming C (although it does not have "vectors"!). This does not work: #include <stdio.h> typedef struct MyStruct { int a, b; }...
You could use Perl. It takes very little code to do the things you want. Basic skeleton: open FILEIN, "names"; open FILEOUT, ">names2";...
Very nice! That would be hard to beat. Using tolower() will deal with uppercase letters as well. int i, n, flags[26]; char *str1="Hello"; char...
sprintf can convert from number to string. Can you post your function?
More detail would be useful. Could you show us the struct?
You're starting min at 0, so nothing will be less than it. You need to start it at the maximum (100). You need to add "continue;" after the out...
Look up the ascii codes. '0' is 48 (decimal). 48 + 9 is 57, which is ascii for '9'. Converting 9 to a char simply tells the system to...
Check out strcspn.
Introduction Here's a little program I wrote that shows the color under the cursor as well as the cursor's position. It's useful for grabbing...
The second case is a pointer to a string CONSTANT. So you cannot (generally) change it.
First, a quick re-write of your "spec". (I'm assuming this is what you meant.) a1[ a2[ b1 ] ] [ a3[ ax1[ b2 ] ] [ ax2[ b3 ] ] [ ax3[ b4 ] ] ]...
Separate names with a comma.