Hi. I am trying to read a file (csv) which has more that 256 characters in a line. I want to read the whole line and extract some information. I am using comma as a seperator.
At the moment, I am reading a line using fgets and placing the tokens in an array using strtok. Then I fgets the same line again and continue placing the token in the same array.
The problem I am having is that as I have no control over where the fgets will finish, I am not able to do proper extraction based on commas.
Can someone help please.
At the moment, I am reading a line using fgets and placing the tokens in an array using strtok. Then I fgets the same line again and continue placing the token in the same array.
The problem I am having is that as I have no control over where the fgets will finish, I am not able to do proper extraction based on commas.
Can someone help please.