Visual Studios returning "system cannot find the file specified" [closed]

  c++

I am an amateur programmer currently taking a c++ class in college. I am working on Visual Studios 2019 and my code for a project keeps saying there are build errors but doesn’t tell me what they are and refuses to debug.

#include <iostream>
using namespace std;

// Initialize the array
int linearSearch(int[], int, int);


int main()
{
    const int SIZE = 10;
    int lotterySelections[SIZE] = { 13579, 26791, 26792, 33445, 55555, 62483, 77777, 85647, 93121 };
    int results, number;

    // Ask user to input latest lottery numbers
    cout << "Please input this weeks lottery numbers.";
    cin >> number;

    // Search the array for a match
    results = linearSearch(lotterySelections, SIZE, number);

    // If linearSearch returned -1, then a match was not found
    if (results == -1)
        cout << "You didn't win this week. :(";
    else
    {
        // Otherwise program shows you win
        cout << "You won!!! :D";
    }
    return 0;
}

Is there something wrong with my code?

Source: Windows Questions C++

LEAVE A COMMENT