[C con Clase] problema en c

algajard algajard en gmail.com
Vie Ago 29 01:31:52 CEST 2008


Hola judit,

> FILE* pt;
> 	char nombre[]= "prueba.txt";
> pt=	fopen (nombre, "r");
> char c;
> while(fgetc(pt)!=EOF) 

debería ser

while( feof( pt ) )

> { 
> printf ("%c",fgetc(pt) ); 

Y si no me equivoco debería ser

printf("%s",fgetc( pt ) );

Salu2...

-- 
"Talk is cheap. Show me the Code"
"'Regression testing'? What's that? If it compiles, it is good, if it 
boots up it is perfect."
-----------------------
Alvaro Esteban Gajardo Becerra
Estudiante Informática - Universidad del Bío Bío
Linux User #407663 counter.li.org
Chillán
Chile




Más información sobre la lista de distribución Cconclase