Your prototypes should match your actual functions. Yours do not:
int doct(int*);
private int doct (int *a)
Either change the prototype to:
private int doct(int*);
or change the function to:
int doct (int *a)
You should also bear in mind that private
is not part of the C language, but people often use it to replace static. This can be made possible by the line:
#define private static
with the only proviso being that that macro must be active wherever you use the private
name. If it's not working on your prototype, that's probably because it's not defined at that point. My advice would be to ditch private
altogether and use static (if indeed that's how private
is defined). People should learn the language, not adopt unnecessary crutches (in my opinion).
Other favourites which I also despise are:
#define global extern
#define begin {
#define end }
The private
and global
are used to mean local to this file and global to all files respectively. The begin
and end
are particularly nasty abominations from people who should go back to Pascal where they belong :-)
In addition to that problem, your line:
static int a = 0;
will actually hide the parameter that you're passing into the function (since it has the same name) and:
*a = a;
will cause an error (since it has a different type). It's rarely a good idea to do that. Rename one of them.