Hi
The following code have a compile error:
printf_format.c pp: In function `void print(int, char*, ...)':
printf_format.c pp:6: invalid conversion from `const char*' to `int'
printf_format.c pp:6: invalid conversion from `int' to `char*'
I am using gcc 3.4, please HELP
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
void print (int numberOfSpace=0 ,char *args="", ...){
print("numberOf Space=%d\n",num berOfSpace);
}
int main(){
printf("asdad") ;
return 0;
}
thanks
from Peter (cmk128@hotmail .com)
The following code have a compile error:
printf_format.c pp: In function `void print(int, char*, ...)':
printf_format.c pp:6: invalid conversion from `const char*' to `int'
printf_format.c pp:6: invalid conversion from `int' to `char*'
I am using gcc 3.4, please HELP
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
void print (int numberOfSpace=0 ,char *args="", ...){
print("numberOf Space=%d\n",num berOfSpace);
}
int main(){
printf("asdad") ;
return 0;
}
thanks
from Peter (cmk128@hotmail .com)
Comment