Read a file address from a txt file using netbeans c

Posted by Yadira Suazo on Stack Overflow See other posts from Stack Overflow or by Yadira Suazo
Published on 2010-06-17T18:27:56Z Indexed on 2010/06/17 20:13 UTC
Read the original article Hit count: 242

Filed under:
|
|

Hi everybody. I`m having problems reading a file address from a txt file. The information seems to be corrupted when I watch it in the debugger. The code is

FILE *parch;
const char * vectorparch[50]; //array with 50 file paths
parch = fopen("/home/irmay/NetBeansProjects/neurona/patrones/patrones.txt", "r");
for(j=0;j<50;j++){
     fread ( vectorparch, sizeof ( char ), 50, parch );
     propagar(vectorparch[j]);      
 }
 fclose(parch);

The file with paths has 50 strings is like this: "/home/irmay/NetBeansProjects/neurona/patrones/10_0.txt","/home/..."

The function propagar is declared void propagar (const char * arch1)

Thank you.

© Stack Overflow or respective owner

Related posts about c

    Related posts about array