Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to use a struct pointer to get a struct pointer array's member Pin
Mircea Neacsu11-Sep-22 15:09
Mircea Neacsu11-Sep-22 15:09 
AnswerRe: how to use a struct pointer to get a struct pointer array's member Pin
Richard MacCutchan12-Sep-22 0:00
mveRichard MacCutchan12-Sep-22 0:00 
AnswerRe: how to use a struct pointer to get a struct pointer array's member Pin
magnomagna23-Sep-22 4:06
magnomagna23-Sep-22 4:06 
QuestionMAPI error MAPI_E_NOT_SUPPORTED problem Pin
jur20028-Sep-22 21:15
jur20028-Sep-22 21:15 
AnswerRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Richard MacCutchan8-Sep-22 21:19
mveRichard MacCutchan8-Sep-22 21:19 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
jur20028-Sep-22 22:24
jur20028-Sep-22 22:24 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Richard MacCutchan8-Sep-22 23:23
mveRichard MacCutchan8-Sep-22 23:23 
AnswerRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Victor Nijegorodov8-Sep-22 22:00
Victor Nijegorodov8-Sep-22 22:00 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
jur20028-Sep-22 23:07
jur20028-Sep-22 23:07 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Victor Nijegorodov8-Sep-22 23:25
Victor Nijegorodov8-Sep-22 23:25 
AnswerRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Randor 8-Sep-22 23:24
professional Randor 8-Sep-22 23:24 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
jur20029-Sep-22 0:44
jur20029-Sep-22 0:44 
GeneralRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Randor 9-Sep-22 1:10
professional Randor 9-Sep-22 1:10 
AnswerRe: MAPI error MAPI_E_NOT_SUPPORTED problem Pin
Gerry Schmitz9-Sep-22 15:54
mveGerry Schmitz9-Sep-22 15:54 
QuestionProblem creating an array of "class" Pin
Roberto64_Ge6-Sep-22 10:25
Roberto64_Ge6-Sep-22 10:25 
SuggestionRe: Problem creating an array of "class" Pin
Mircea Neacsu6-Sep-22 10:38
Mircea Neacsu6-Sep-22 10:38 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge6-Sep-22 10:57
Roberto64_Ge6-Sep-22 10:57 
AnswerRe: Problem creating an array of "class" Pin
Richard MacCutchan7-Sep-22 5:10
mveRichard MacCutchan7-Sep-22 5:10 
The array variable needs to point to an array of pointers, so the syntax needs to be:
C++
anagrafica** Arr_ = new anagrafica*[N]; // a pointer to an array of pointers

for (int i = 0; i < N; i++)
{
	Arr_[i] = new anagrafica("ciao", "miao", i*25);
}

Remember that Arr_ is a pointer to the actual array so it will appear to contain only one element. But you can check the contents with another simple loop.

You could make life much simpler for yourself by using one of the STL containers, such as vector<T>.
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 3:55
Roberto64_Ge8-Sep-22 3:55 
GeneralRe: Problem creating an array of "class" Pin
Greg Utas8-Sep-22 4:24
professionalGreg Utas8-Sep-22 4:24 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 4:32
Roberto64_Ge8-Sep-22 4:32 
GeneralRe: Problem creating an array of "class" Pin
Greg Utas8-Sep-22 6:59
professionalGreg Utas8-Sep-22 6:59 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 23:57
mveRichard MacCutchan8-Sep-22 23:57 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 4:32
mveRichard MacCutchan8-Sep-22 4:32 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 4:36
Roberto64_Ge8-Sep-22 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.