+ 4
I have a problem with "sololearn compiler" sometimes I want to cout a var but it give me "no output" why
16 Respostas
+ 9
~swim~, thanks for the great explanation :)
+ 8
int size(10);
Is it right? I'm not sure though.
+ 3
thanks for the information swim
+ 2
"int size(10);
Is it right? I'm not sure though."
correction please?
+ 2
"You initialize int size to 10 and get Segmentation Fault in this line: distance[size]=discalc(cityX[i],cityX[j],cityY [i],cityY[j]);
thus your program crashes before producing output. So change
int size(10); to
int size = 0;
or int size(0); if you really want to use that fancy int constructor."
thanks
+ 1
post your code so people can help