Hi everyboby,
I have some problem using the release configuration of Visual Studio and the following code. Is there anybody who can tell me how to use struct with inside a vector?
Thank you
I have some problem using the release configuration of Visual Studio and the following code. Is there anybody who can tell me how to use struct with inside a vector?
Thank you
Code:
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include <time.h> #include <iostream> #include <fstream> #include <math.h> #include <string.h> #include <errno.h> #include <string> #include <sstream> #include <errno.h> #include <vector> #include <algorithm> #include <set> using namespace std; typedef struct{ int progressivo; int colonna_temporale_IN[1500]; int colonna_temporale_OUT[1500]; }risorsa_localita; typedef struct{ int progressivo; vector <risorsa_localita > risorse_localita; }struttura_risorse_localita; struttura_risorse_localita *vettore_risorse_localita; int main() { int i,j,k; vettore_risorse_localita=(struttura_risorse_localita *)calloc(1000,sizeof(struttura_risorse_localita)); for(i=0;i<1000;i++){ vettore_risorse_localita[i].progressivo=i; for(j=0;j<5;j++){ risorsa_localita risorsa_appoggio; for(k=0;k<1500;k++){risorsa_appoggio.colonna_temporale_IN[k]=0;} for(k=0;k<1500;k++){risorsa_appoggio.colonna_temporale_OUT[k]=0;} vettore_risorse_localita[i].risorse_localita.push_back(risorsa_appoggio); } cout << "PREMI INVIO\n"; cin.get(); return 1; } }
Comment