Почему мой массив печатает мусор из памяти? [закрыто] ⇐ C++

Программы на C++. Форум разработчиков
Anonymous
Почему мой массив печатает мусор из памяти? [закрыто]

Сообщение Anonymous »

Вот мой код:

Код: Выделить всё

#include 
using namespace std;

class Sumator {
public:
int s = 0;
int Numbers[10];
int sum = 0;
void sumall() {
cout  Numbers[i];
}
}

int n = sizeof(Numbers) / sizeof(Numbers[0]);

void Suma()
{
for (int i = 0; i < n; i++){
sum += Numbers[i];
}
cout 

Подробнее здесь: [url]https://stackoverflow.com/questions/79111528/why-is-my-array-printing-some-junk-of-memory[/url]

Вернуться в «C++»