Forum Discussion
Altera_Forum
Honored Contributor
18 years agohello,
I have DE2-70 board and I need to read a data file from my pc and write it into sdram for further processiong this data.I am using following code to open a file.but it is not working . # include <stdio.h> int main() { FILE * pFile; char mystring [100]; pFile = fopen ("c:\myfile.txt" , "r"); if (pFile == NULL) perror ("Error opening file"); else { fgets (mystring , 100 , pFile); puts (mystring); fclose (pFile); } return 0; } I have also tried a template'host file system ' but for all file related functions error is like.. undefined reference to fopen etc. please help me.