Forum: C Sep 13th, 2004 |
| Replies: 3 Views: 2,071 rather than
printf("Greetings!\n");
You could use:
const char* greeting = "Greetings!\n";
printf( greeting ); |
Forum: C Aug 30th, 2004 |
| Replies: 6 Views: 7,462 Huh? It sounds like the assignment is, given a node in the target list, insert a new node into it. Otherwise you'd have an assignment like "insert in sorted order"
So, given a target node called... |
Forum: C Jul 12th, 2004 |
| Replies: 32 Views: 47,705 Check out 'strtok()'; it will parse a string, stopping on one or more tokens; in this case your ':'.
The strings you parse could be referenced by an array of string pointers:
const char*... |
Forum: C Jun 26th, 2004 |
| Replies: 3 Views: 19,298 If you know the window to send them to, you can use WM_MOUSEMOVE and WM_MOUSEACTIVATE. But you have to know the HWND. One way to do that is to use EnumWindows and EnumChildWindows to find the... |
Forum: C Jun 21st, 2004 |
| Replies: 12 Views: 15,601 How about:
int is_prime_helper( int n, int test )
{
if (test < 2) return 1;
if (!(n%test)) return 0;
return is_prime_helper(n,test-1);
}
int is_prime(int n,int p) |