Good people,
I just had an error in this fairly simple code, which I had never seen before.
#include <iostream>
#include <iomanip>
#include <string.h>
#include <stdio.h>
const int tam = 10;
using namespace std;
struct Votante {
int DNI;
char nombre[40];
bool presente;
};
void carga(Votante x[]){
string nom;
for (int i=0; i<tam; i++){
cin >> x[i].DNI;
cin >> nom;
strcpy(x[i].nombre, nom.c_str());
}
}
void carga2 (Votante x[], FILE *z){
z = fopen("Padron.bin","wb");
for (int e = 0;e < tam;e++){
fwrite(&x[e],sizeof(Votante),1,z);
}
fclose(z);
}
int main{
Votante a[tam];
FILE *t;
carga(a);
carga2 (a, t);
}
And I get this error (Line 35 is the int main one)
35 9[Warning] extended initializer lists only available with -std=c++11 or -std=gnu++11
I never saw this error in what I've been compiling all this time, and I searched and did not find out what it could be about.
Greetings