Click here to Skip to main content
15,501,342 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 6:18
MemberRoberto64_Ge8-Sep-22 6:18 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 6:25
mveRichard MacCutchan8-Sep-22 6:25 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 6:27
MemberRoberto64_Ge8-Sep-22 6:27 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 6:17
mveRichard MacCutchan8-Sep-22 6:17 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 6:26
MemberRoberto64_Ge8-Sep-22 6:26 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 6:38
mveRichard MacCutchan8-Sep-22 6:38 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 6:43
MemberRoberto64_Ge8-Sep-22 6:43 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 6:37
MemberRoberto64_Ge8-Sep-22 6:37 
Clarified the syntax problem I resume here.
The code works also in this way ::

C++
anagrafica* Arr_ = new anagrafica[N];

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

for (int i=0; i<N; i++)
{
 file>>chiave;
 file>>n;
 file>>c;
 Arr_[i].setChiave(chiave);
 cod(Arr_[i],n,c,chiave);
}
for (int i=0; i<N; i++)
	Arr_[i].stampa();


Because I can see all the Arr_ elements containing instances of the class. But two methods recalled from one other method do not heve effects.
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan8-Sep-22 6:45
mveRichard MacCutchan8-Sep-22 6:45 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge8-Sep-22 9:04
MemberRoberto64_Ge8-Sep-22 9:04 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan9-Sep-22 0:37
mveRichard MacCutchan9-Sep-22 0:37 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge9-Sep-22 11:30
MemberRoberto64_Ge9-Sep-22 11:30 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan9-Sep-22 23:00
mveRichard MacCutchan9-Sep-22 23:00 
GeneralRe: Problem creating an array of "class" Pin
Roberto64_Ge10-Sep-22 1:34
MemberRoberto64_Ge10-Sep-22 1:34 
GeneralRe: Problem creating an array of "class" Pin
Richard MacCutchan10-Sep-22 1:47
mveRichard MacCutchan10-Sep-22 1:47 
QuestionHow can do it in c++? Pin
Member 157580955-Sep-22 7:07
MemberMember 157580955-Sep-22 7:07 
GeneralRe: How can do it in c++? Pin
Richard MacCutchan5-Sep-22 7:43
mveRichard MacCutchan5-Sep-22 7:43 
AnswerRe: How can do it in c++? Pin
Greg Utas5-Sep-22 7:44
mveGreg Utas5-Sep-22 7:44 
QuestionRe: How can do it in c++? Pin
CPallini5-Sep-22 21:50
mveCPallini5-Sep-22 21:50 
QuestionCombining QProcess, qterminal and bluetoothctl...in C++ code Pin
Member 149687714-Sep-22 6:28
MemberMember 149687714-Sep-22 6:28 
AnswerRe: Combining QProcess, qterminal and bluetoothctl...in C++ code Pin
Mircea Neacsu4-Sep-22 7:05
mvaMircea Neacsu4-Sep-22 7:05 
GeneralRe: Combining QProcess, qterminal and bluetoothctl...in C++ code Pin
Member 149687714-Sep-22 7:38
MemberMember 149687714-Sep-22 7:38 
GeneralRe: Combining QProcess, qterminal and bluetoothctl...in C++ code PinPopular
Gerry Schmitz4-Sep-22 9:21
mveGerry Schmitz4-Sep-22 9:21 
AnswerRe: Combining QProcess, qterminal and bluetoothctl...in C++ code Pin
Richard MacCutchan4-Sep-22 22:37
mveRichard MacCutchan4-Sep-22 22:37 
Questionforeach - basic C++ question Pin
Member 1496877129-Aug-22 8:23
MemberMember 1496877129-Aug-22 8:23 

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.