>>112 > dup2を詳しく解説してください man dup2 名前 dup2 - duplicate an open file descriptor
形式 #include <unistd.h>
int dup2(int fildes, int fildes2);
DESCRIPTION The dup2 function causes the file descriptor fildes2 to refer to the same file as fildes. The fildes argument is a file descriptor referring to an open file, and fildes2 is a non-negative integer less than the current value for the maximum number of open file descriptors allowed the calling process. See getrlimit(2). If fildes2 already refers to an open file, not fildes, it is closed first. If fildes2 refers to fildes, or if fildes is not a valid open file descriptor, fildes2 will not be closed first.
The dup2 function is equivalent to fcntl(fildes, F_DUP2FD, fildes2).)
double ***mona(int X, int Y, int Z) { int i, j; double ***a; a = (double***)malloc((X+1)*sizeof(double**)); for(i=0;i<=X;i++){ a[i] = (double**)malloc((Y+1)*sizeof(double*)); for(j=0;j<=Y;j++){ a[i][j] = (double*)malloc((Z+1)*sizeof(double)); } } return a; }
>>682 char c ; long n ; getchar () ; 上を、全て下のように変えて、駄目だったら、 int c ; size_t n ; fgetc(stdin) ; 次の結果がどうなるか報告するように。 printf("Hello, world!\n%ld\nHello, world!",n) ;
ちょっと手直し(n -> from to) (define (example10 from to r p) (let loop ((i from)) (cond ((<= i to) (cond ((< 0 r) (if (not (memv i p)) (example10 from to (- r 1) (cons i p))) (loop (+ i 1))) (else (disp-rev p) (display " ") )))))) (define (example1 from to r) (example10 from to r '()))