#include <stdio.h>
#include <stdlib.h>
void testfunc (int x,int len) {
len=10000;
printf("%d\n", x);
return (len);// warning: 'return' with a value, in function returning void
}
int main (int argc, char *argv[]) {
int len;
if (argc>2) testfunc(atoi(argv[2]), len );
printf("%d\n", len);
}
Please, suggest me which's way to take what I mean.
Just i want took and put value into one function. When I tried compile this code have been warning and as expected return(len) doesn't work. Advice me how to fix it?