그래서 벡터 배열에 루프를 통해 찾은 제수를 추가하는 데 문제가 있습니다. 나는 사용자가 번호를 입력하고 그 루프를 통해, 나는 모든 약수를 찾아 나서 문제가 배열에 추가하는 데 문제 요청한() 주 내 INT에서벡터 배열에 요소 추가
#include <iostream>
#include <vector>
using namespace std;
vector <int> numbers;
bool isSummableNumber(int num)
{
for (int i=1; i<=num; i++)
{
if (num%i==0)
{
// this is where I need to send them to the array
}
}
.
볼 http://msdn.microsoft.com/de-de /library/7fthz5xd.aspx – road242