$g++ samp.cc samp.cc: In function `int main(int, char **)': samp.cc:11: no match for `foo & = unsigned int' samp.cc:6: candidates are: class foo & foo::operator =(const foo &)
for (i = 1; i <= 9; i++) sign[i] = -1; do { x = n = 0; s = 1; for (i = 1; i <= 9; i++) if (sign[i] == 0) n = 10 * n + i; else { x += s * n; s = sign[i]; n = i; } x += s * n; if (x == 100) { for (i = 1; i <= 9; i++) { if (sign[i] == 1) printf(" + "); else if (sign[i] == -1) printf(" - "); printf("%d", i); } printf(" = 100\n"); } i = 9; s = sign[i] + 1; while (s > 1) { sign[i] = -1; i--; s = sign[i] + 1; } sign[i] = s; } while (sign[1] < 1); return EXIT_SUCCESS; } -1+2-3+4+5+6+78+9=100を表示させないようにするにはどうしたらよいですか おしえてください。お願いします。