Código:
XXXX<caracteres long long en binario>AAAA
Para estoy tratando de hacerlo con el siguiente programa:
Código:
#include<iostream>
#include<fstream>
#include<sstream>
using namespace std;
int main()
{
struct transaccion
{
string campo1;
long long campo2;
long long campo3;
string campo4;
};
ofstream file;
file.open("Base.txt",ios::binary);
struct transaccion trx;
trx.campo1="XXXX";
trx.campo2=1000;
trx.campo3=1000;
trx.campo4="AAAA";
file.write((char *)&trx, sizeof(trx));
file.close();
return 0;
}
El tema es que me queda todo binario

Gracias
Saludos