I don’t know how to call a file in a function, and I’m now even sure If my code is good for the given task, basically I two .stl files one to convert into a .txt file the other one into a .bin file using c. ive written some code but when I try to run it it says that it can’t open the file.
small portion of the code, but the problem must start here
ive seen online that I’m supposed to call a file in a function using. something like this.
but that just prints a error
Objekt3D* citaj_binarni_stl(const char* primjerbin)
Objekt3D* citaj_binarni_stl(const char* primjerbin) {
FILE *file = fopen("primjerbin.stl", "rb");
if (file == NULL) {
printf("Greska pri otvaranju binarne datoteke.\n");
return NULL;
}
You need to sign in to view this answers