Morgen Leute,
myfuncs.c
#include "myfuncs.h"
#define myfuncs_h
#include <math.h>
#include <stdlib.h>
enum {DIM=3};
void func1(..);
int func2(..);
#endif
int main(void){
int read_mat(double mat [DIM][DIM]; FILE *fp);
void print_mat(double mat[DIM][DIM]);
void transp_mat(double mat[DIM][DIM]);
void swapd(double *a, double *b);
}

Also ich habe etwas an meiner main.c Datei gearbeitet was muss ich in der main.c Datei machen genau um zur myfuncs.c Datei zu wechseln und wozu dient die Header Datei dabei.?
Ich weiß ist etwas dürre hab mich mit der main.c Datei mehr beschäftigt.
Code:
main.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "myfuncs.h"
int main (){
enum {dim=3};
double mat[dim][dim]= {0};
double vec_a[dim];
double vec_b[dim] = {0};
double ;
FILE *fp;
if((fp=fopen("/Users/********/Desktop/INF 1/INF 1/Übg4/A4-3.txt" , "r"))==NULL) {
fprintf(stderr, "Konnte Datei nicht finden\n");
return 1;
while(read_mat(mat,fp)){
printf("Originale-Matrix\n");
print_mat(mat);
transp_mat(mat);
printf("Transponente Matrix\n");
print_mat(mat);
}
fclose(0);
}
}
[ATTACH=full]65358[/ATTACH]
#include "myfuncs.h"
#define myfuncs_h
#include <math.h>
#include <stdlib.h>
enum {DIM=3};
void func1(..);
int func2(..);
#endif
int main(void){
int read_mat(double mat [DIM][DIM]; FILE *fp);
void print_mat(double mat[DIM][DIM]);
void transp_mat(double mat[DIM][DIM]);
void swapd(double *a, double *b);
}

Code:
myfuncs.h
#ifndef MYFUNCS//.h //
#define MYFUNCS//.h//
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
enum {DIM=3};
void func1();
int func2();
#endif

Also ich habe etwas an meiner main.c Datei gearbeitet was muss ich in der main.c Datei machen genau um zur myfuncs.c Datei zu wechseln und wozu dient die Header Datei dabei.?
Ich weiß ist etwas dürre hab mich mit der main.c Datei mehr beschäftigt.