Controllato funzionamento existsFile() createFile() in logic.c
This commit is contained in:
1 parent
d82b5466b0
commit
7eee20414c
2 files changed
+7
-4
No files matched your search
+2
-2
@@ -34,7 +34,7 @@ void createFile(const char *fname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char* getProducts(const char *fname) {
|
char* getProducts(const char *fname) {
|
||||||
FILE *file;
|
/* FILE *file;
|
||||||
|
|
||||||
if((file=fopen(fname, "r"))==NULL) {
|
if((file=fopen(fname, "r"))==NULL) {
|
||||||
printf("Errore nell'apertura del file");
|
printf("Errore nell'apertura del file");
|
||||||
@@ -50,7 +50,7 @@ char* getProducts(const char *fname) {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
int getCount(){
|
int getCount(){
|
||||||
|
|||||||
+5
-2
@@ -7,8 +7,11 @@
|
|||||||
#include "../include/globals.h"
|
#include "../include/globals.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
printf("%d", exists("qwestoeuntest"));
|
/* Working
|
||||||
|
printf("%d", existsFile("qwestoeuntest"));
|
||||||
createFile("qwestoeuntest");
|
createFile("qwestoeuntest");
|
||||||
printf("%d", exists("qwestoeuntest"));
|
printf("%d", existsFile("qwestoeuntest"));
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user