Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/04/2007, 10:31
bilkarm3
 
Fecha de Ingreso: julio-2005
Ubicación: Guatemala
Mensajes: 165
Antigüedad: 18 años, 9 meses
Puntos: 0
Re: No puedo hacerlo en C++

Bueno accidentalmente ya casi esta, EL PROBLEMA AHORA ES ESCRIBIR EN EL ARCHIVO.... ¿ayuda por favor?!!!!

Este es el nuevo código que accidentalmente me esta funcionando:
Código PHP:
#include <iostream.h>;
#include <conio.h>;
#include <stdio.h>;


void frase()
{
   
char *palabra;
   
int i,j;
   
FILE *fichero;
   
fichero fopen("entrada.txt""r");
   
clrscr();
   
i=0;
   while(!
feof(fichero))
   {
      
fgets(palabra,100,fichero);
      
i=strlen(palabra);
      for (
j=i;j>=0;j--)
      {
          
cout<<palabra[j];
      }
   }
   
fclose(fichero);
   
//cout<<i;
   
getchar();
   return;
}

//FUNCION PRINCIPAL
void main()
{
    
int opcion=0;
   while (
opcion != 3)
   {
      
clrscr();
      
cout<<"1. Ingresar Frase"<<endl;
       
cout<<"2. Crear Archivo Binario"<<endl;
      
cout<<"3. Salir"<<endl;
       
cin>>opcion;
       
//OPCION 1, VOLTEAR EL CONTENIDO DE UN ARCHIVO
       
if (opcion==1frase();
   }

__________________
Guatemala - Guatemala