Originally Posted by
tcumech
nice philosophy...next?
If it helps having more people tell you that you "obviously know nothing about c programming" (your own words), then I'm here. No one is trying to be mean, just it gets very tedious having to repeatedly re-assure people about their ego and feelings.
But you are not totally unjustified in being paranoid either, so let's go thru this line by line.
Code:
void oddDel (int x[] ) {
int i;
char b[], temp;
It is much more normative to refer to pointers as *x and *b rather than x[] and b[]. And, in fact, "char b[]" should generate a compiler error. What compiler are you using?
Code:
for ( i=0; i < x[]; i++) {
What on earth is the value of x[] supposed to represent here? I guarantee it is not what you want or think.
You cannot determine the length of an array in C this way. You need to supply the length of the array, one of two ways:
Code:
void oddDel (int x[10]); // fixed length
void oddDel (int *x, int len); //dynamic length
That's enough. You need to resolve this issue or you are wasting your own and everyone else's time. Don't get upset.