31 lines
524 B
C++
31 lines
524 B
C++
#include <conio.h>
|
|
|
|
#include "d:\program\src_dos\libs\bdatos\bdatos.hh"
|
|
#include "d:\program\src_dos\tpv\tpv_def.h"
|
|
|
|
|
|
BDatos BReg;
|
|
VENTAS SReg;
|
|
|
|
|
|
void main ( void )
|
|
{
|
|
long i;
|
|
|
|
if ( BReg.AbrirReg( "ventas.tmp", sizeof( VENTAS ) ) == ERROR )
|
|
{
|
|
cprintf( "Error leyendo VENTAS.TMP\r\n" );
|
|
return;
|
|
}
|
|
|
|
for ( i = 0; i < BReg.Registros(); i++ )
|
|
{
|
|
BReg.LeeReg( (void *)&SReg, i );
|
|
cprintf( "Reg %02d: %09lu %06u %06lu %06lu\r\n", i, SReg.CodigoR, SReg.Cantidad, SReg.PrecioC, SReg.PrecioV );
|
|
}
|
|
|
|
BReg.CerrarReg();
|
|
|
|
}
|
|
|