I have no idea why I'm getting this error on this basic program. I even checked the code and searched this site and Google for answers. I don't understand how to fix my error though.
LINKS:
E0289 : No instance of constructor "Phone::Phone" matches the argument list?
no instance of constructor matches the argument list
Error: No instance of constructor matches the argument list
Here is my code:
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include "trimdecimal.h"
using namespace std;
class Movie {
public:
string title;
string director;
string mainCast1;
string mainCast2;
int yearReleased;
bool isAHit;
int publicLikePercentage;
};
int main()
{
Movie movie1 = Movie("Fast & Furious Presents: Hobbs & Shaw", "David Leitch", "Dwayne Johnson", "Jason Statham", 2019, true, 89);
}
And I am getting this error as I stated in the title:
E0289 no instance of constructor "Movie::Movie" matches the argument list
I coded this on Visual Studio 2019
Any solutions? I will wholeheartedly appreciate any fixes but please be specific and explain to me how to solve it like how you'd do to a child.