PDA

View Full Version : [C++] confronto file di testo


athebustop
24-06-2004, 18:05
ciao a tutti,

come faccio a confrontare questi tre file allegati tramite if..else?
per esempio due hanno una riga che l'altro non ha.. come faccio a saltare di riga in riga e confrontare quello che trovo con quello che mi aspetto?

grazie

- - - MATERIALE ALLEGATO - - -

+ acceso.txt

This utility has `-h' and `-vh' options
that provide brief help and a full manual.

This utility will load the port adapter `dsk6x11pp.dll'.
This utility will operate on port `0x0378'.
This utility has detected a XDS510 class controller.

This utility will attempt to reset the controller.
This utility has successfully reset the controller.


+ spento.txt

This utility has `-h' and `-vh' options
that provide brief help and a full manual.

This utility will load the port adapter `dsk6x11pp.dll'.
This utility will operate on port `0x0378'.

---[An error has occurred and this utility has aborted]---------

This error was generated by a USCIF adapter library
that is currently accessible to TI's USCIF driver.
The decimal value is: `-701'.
The title string is: `POD_ERR_MAP1'.

The explanation is:
This error resulted from the first attempt to access the
DSK hardware. The status from the DSK was erroneous. The
most common causes of this problem are:
1. No power to the DSK
2. The cable is disconnected from the parallel port
3. The DSK is locked up and requires a power cycle


+ ccstud.txt

This utility has `-h' and `-vh' options
that provide brief help and a full manual.

This utility will load the port adapter `dsk6x11pp.dll'.
This utility will operate on port `0x0378'.

---[An error has occurred and this utility has aborted]---------

This error was generated by TI's USCIF driver.
The decimal value is: `-110'.
The title string is: `SC_ERR_OCS_ALREADY_OPEN'.

The explanation is:
This utility was able to open the controller, but
the controller is already in use by Unified-SCIF.
You must exit other debuggers and utilities that
use Unified-SCIF because this utility must be the
only client of Unified-SCIF and the controller.

cionci
24-06-2004, 19:20
Basta che tu legga il file che ti "aspetto" e quello che hai byte per byte... Se c'è un byte diverso allora visualizzi la linea dove c'è il byte diverso...