This is my solution to the problem of finding a value inside a C++ array:
#include <iostream>
#include <sys/resource.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <algorithm>
#include <vector>
using namespace std;
class Answer
{
public:
static bool exists(int ints[], int size, int k)
{
bool result = false;
for (int i = 0; i < size; i++)
{
if (ints[i] == k)
result = true;
}
return result;
}
};
The grader took points off citing the following reasons:

What could I have done to meet their requirements?
Xon the item marked as such.