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 ] ] ]...
These days it may be good to start with C#.
Also, is your friend using the same operating system and compiler as you? graphics.h is an old (Borland BGI) thing. You're best not to use it.
It would be useful if you tell us where you got the bulk of the code from so we could see the original (which presumably works). This looks...
I don't see how both Insert and ExtractMax can be O(1). Obviously Insert can be O(1) if you just append new elements to the end of a vector, but...
Please do two things: 1. Put your code in code blocks so that the indentation is preserved. 2. Be more specific about the error. Same thing...
What you have amounts to this:void SUM (2,4) { printf("hi"); } void main() { SUM (2,4); }Do you see the problem?
Separate names with a comma.