Reputation: 13
I am new to C and have a problem with my code.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
bool a(char[], int);
void b(char[], int[], int);
void c(char[], int[], int, int);
void d(char[], int, int[], int);
int main(int argc, char ** argv) {
return 0;
}
bool a(char[] x, int y) {
return true;
}
void b(char[] x, int[] y, int z) {
}
void c(char[] x, int[] y, int z, int q) {
}
void d(char[] x, int y, int[] z, int q) {
}
This code doesn't compile, but gives me an error message instead.
The problem is, I don't see why it does that...
Upvotes: 1
Views: 1936
Reputation: 145829
bool a(char[] x, int y) {
must be
bool a(char x[], int y) {
(And so on for the other definitions.)
Upvotes: 3