c - File wont open using fopen -
i cannot seem open .txt file,it doesnt work .csv files how open? (this program im trying make searches phrase inside csv file)
#include <stdio.h> #include <stdlib.h> #define array_width 320 int main(int argc, char *argv[]) { int = 0, j = 0; char bigstring[200]; file* csv; csv = fopen("c:\users\ofek\desktop\folder\source.txt","r+t"); while (feof(csv) != 1) { if (fgetc(csv) != '\n') { char bigstring[i] = fgetc(csv); i++; } } }
replace single backslashes 2 backslashes:
c:\\users\\ofek\\desktop\\folder\\source.txt otherwise character after backslash interpreted control characters.
Comments
Post a Comment