If you have no real idea how the compiler handles these expression, why don't you try a little testprogram and let the compiler do the work for you :-)
#include <stdio.h>
int main ()
{...
Type: Posts; User: ForzaItalia2006
If you have no real idea how the compiler handles these expression, why don't you try a little testprogram and let the compiler do the work for you :-)
#include <stdio.h>
int main ()
{...
Okay, I agree. You're right :-)
Why? Sure, it's a possibly harder to read, but formally correct :-)
That's great to hear that it worked :-) Sure, I could give some kind of background about this.
Whenever you pass a parameter to a function, this parameter is passed by-value, meaning that its...
Hey,
first of all, in C you _NEVER_ call by reference. C only allows to call-by-value. Call-by-reference is an enhancement in C++.
This is how your code should work:
#include <stdio.h>...
Check out this link Simple DirectMedia Layer (SDL library)
Hey,
when saying that you use a mutex, do you mean the mutex associated with the condition variable or do you use an additional mutex.
According to the POSIX standard, pthread_cond_signal...
Hey,
There are some issues with your code and I would recommend to also read a book about algorithms, especially sorting algorithms, because that what you do has nothing to do with sorting an...
Hey,
I assume you're working on a Windows box?
Please read this FAQ entry: Cprogramming.com FAQ > Stop my Windows Console from disappearing everytime I run my program?
- Andi -
Yes, you execute two separate commands, just like a shell would do. But, you connect both programs by the pipe. Though, to clarify what salem already explained:
ls -- write --> | PIPE | -- read...
Hey,
once the exec*(2) call is successful, exec*(2) won't return to your "original" program.
To realize the command "ls | wc", you could fork(2) two processes and connect them by a pipe(2) and...
I shortly hesitated to list that example, but I completely feared the reactions :p
By using loops whose loop-counter corresponds to your input. As said above, if you use a loop to print the characters you will print 5 characters if the user's input was 5, and 10 accordingly if the...
Instead of requesting a complete algorithm (with exclamation mark), you should have used Dr. Google with "TREE QUICKSORTING with MPI"!!! The first hit shows an example of a quicksort MPI...
Yes, you're indeed right. I originally thought this should work (especially when working with pointers), but I got a compiler error that an lvalue is required. But I must admit, that I was to fast...
That's the first one where you have to manually copy the '\0' into destination[i] after the loop.
Yes, that works as well, but only if destination is declared as "char *". If you declare...
PRIVATE is not a C keyword. To make a function private you need to use the static keyword. So, maybe you are missing a
#define PRIVATE static?
Or, you should just replace PRIVATE by static ......
Hey,
the C compiler always binds the "else" to the inner-most if, so that your else is not bound to the "if (direction == 1)". Your indention however easily leads to the assumption that your code...