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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -