This are my 2 structures:
struct W_perfil_header {
double pk;
unsigned short int num_sups;
double pd,px,py,pz,azi;
};
struct W_perfil {
W_perfil_header header;
std::vector<W_sup> V_sups;
};
struct W_perfil_header {
double pk;
unsigned short int num_sups;
double pd,px,py,pz,azi;
};
struct W_perfil {
W_perfil_header header;
std::vector<W_sup> V_sups;
};
To copy to clipboard, switch view to plain text mode
the code that work with them pseudocode)
class.h
Public :
W_perfil * w_perfil;
class.cpp
create_perf() {
w_perfil = new W_perfil;
do things ....
w_perfil->header.num_sups++;
....
close_perf() {
delete w_perfil; } // I dont know if it is necessary, I have a new at create_perf...
class.h
Public :
W_perfil * w_perfil;
class.cpp
create_perf() {
w_perfil = new W_perfil;
do things ....
w_perfil->header.num_sups++;
....
close_perf() {
delete w_perfil; } // I dont know if it is necessary, I have a new at create_perf...
To copy to clipboard, switch view to plain text mode
Ok
I suppose that initially
w_perfil->header.num_sups is = 0.
w_perfil->header.num_sups are going to value 1 to 10 ( usually)
I'm surprised that w_perfil->header.num_sups reached 671
( I have 671 calls to create_perf and close_perf ...)
I have search c++`delete on the web and I discover that some people has the same problem as me.... But I keep on with the problem.
I hope you can give some tips...
Thanks
Bookmarks