Hello. Im doing this program where you enter a movie collection and then it sorts it by the length of the movies. I get an error that i dont understand at line 41
#include <iostream>
#include <stdlib.h>
usingnamespace std;
struct collection {
string namn;
string skapare;
int length;
};
void filmsortering(collection info[], int filmer);
int main()
{
int filmer;
cout << "Number of movies in your collection: ";
cin >> filmer;
cin.ignore(1000, '\n');
collection filmsamling[filmer];
for (int i = 0; i < filmer; i++) {
cout << "Title of your movie: ";
getline(cin, filmsamling[i].namn);
cout << "Director of that movie: ";
getline(cin, filmsamling[i].skapare);
cout << "The length of that movie: ";
cin >> filmsamling[i].length;
cin.ignore(1000, '\n');
}
for (int m = filmer-1; m > 0; m--)
{
for (int n = 0; n < m; n++)
{
if (info[n].length > info[n+1].length)