Original file is very large (1.14GB), I cannot upload it. Here I am giving a small similar file.
Filehttp://www.filedropper.com/test_101
The expected graph is like this (dy.png), that is, the peak should be at 0 and other positive and negative number is equally distributed. But the obtained graph by the above code is different. Looking for your kind co-operation. Thanks in advance.
Did you ever look at your csv file? It looks like this (see below) - no need to download MB of data!
In particular, this csv file contains multi-row columns in doublequotes. The next question is which values you want to read and display. It seems you want the first column. In that case you need to check the number of double quotes. I.e. read the first field, then (in this case) read until you encounter the " at the end of a line.
And by the way: in C++ this line:
should fail to compile. fgets takes a pointer to a char, not to an array. I.e. use &line[0]. You can also use the fact that arrays decay to pointers -> fgets(line, …) (no &)
I have ran your progam on a subset of your file and seems to me the first column is read correctly.
This only problem I see is that the entry before each line starting by “Name” is counted twice.