Test spiegazione francesco
This commit is contained in:
1 parent
7eee20414c
commit
b5d9009ce1
9 files changed
+6
-9
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
+4
-8
@@ -13,6 +13,8 @@
|
|||||||
* TODO: Aggiungere copie venduto di prodotto a file
|
* TODO: Aggiungere copie venduto di prodotto a file
|
||||||
* TODO: Cambiare nome dei file con interagisce
|
* TODO: Cambiare nome dei file con interagisce
|
||||||
* TODO: Calcolare la somma delle entrate dati i file
|
* TODO: Calcolare la somma delle entrate dati i file
|
||||||
|
* TODO: Aggiungere la possibilità di aggiungere gli acquisti non compiuti con intenzioni di acquisto.
|
||||||
|
* e.g. persona vuole acquistare maglietta S ma non c'è la taglia
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *products;
|
char *products;
|
||||||
@@ -36,12 +38,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) {
|
file = fopen(fname, "r")
|
||||||
printf("Errore nell'apertura del file");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO QUESTO CODICE NON E' MIO, RICONTROLLARE FUNZIONAMENTO fread()
|
|
||||||
|
|
||||||
while(!feof(file)){
|
while(!feof(file)){
|
||||||
n = fread(buffer, sizeof(char), sizeof(buffer), file);
|
n = fread(buffer, sizeof(char), sizeof(buffer), file);
|
||||||
@@ -49,8 +46,7 @@ char* getProducts(const char *fname) {
|
|||||||
if (buffer[i] == c)
|
if (buffer[i] == c)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);*/
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int getCount(){
|
int getCount(){
|
||||||
|
|||||||
+1
-1
@@ -122,7 +122,7 @@ void runOptionsMenu(){
|
|||||||
curs_set(0);
|
curs_set(0);
|
||||||
wattroff(optionsWin, COLOR_PAIR(2));
|
wattroff(optionsWin, COLOR_PAIR(2));
|
||||||
|
|
||||||
if (exists(input)) {
|
if (existsFile(input)) {
|
||||||
statusf("Il file '%s' esiste e verra' utilizzato al posto di '%s'", input, productPricesFileLocation);
|
statusf("Il file '%s' esiste e verra' utilizzato al posto di '%s'", input, productPricesFileLocation);
|
||||||
strcpy(productPricesFileLocation, input);
|
strcpy(productPricesFileLocation, input);
|
||||||
}
|
}
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user