What is the meaning of "range-based for loop is a C++11 extension" and what is expected expression?

This is my code :

class YouTubeChannel {
    public:
    string Name;
    string OwnerName;
    int SubsCount;
    list<string> PublishedVideos;

};



int main(){

    YouTubeChannel ytChannel;
    ytChannel.Name = "Wonder World";
    ytChannel.OwnerName = "Sally";
    ytChannel.SubsCount = 1200;
    ytChannel.PublishedVideos = {"Victoria Memorial", "Red Fort", "Monument"};

    cout<<"Name : "<<ytChannel.Name<<endl;
    cout<<"Owner Name : "<<ytChannel.OwnerName<<endl;
    cout<<"Subs count : "<<ytChannel.SubsCount<<endl;
    cout<<"Videos : "<<endl;
    for(string videoTitle : ytChannel.PublishedVideos){
        cout<<videoTitle<<endl;
    }
    return 0;
}

I am getting two errors :

 error: expected expression
    ytChannel.PublishedVideos = {"Victoria Memorial", "Red Fort", "Monument"};
                                ^
 warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
    for(string videoTitle : ytChannel.PublishedVideos){
                          ^

Kindly plz tell me what shall i do so that I don't get this errors??

Expected Output is :

Name : Wonder World
Owner Name : Sally
Subscriber Count : 1200
Videos : 
Victoria Memorial
Red Fort
Monument

warning: range-based for loop is a C++11 extension [-Wc++11-extensions]

What this means is that you are compiling your code with a version of C++ selected that is prior to C++11, but as an extension, your compiler is going to allow you to do it anyway. However, the code is not portable because not all compilers will allow it. That is why it is warning you.

If you want your code to be portable, you should either stop using the range-based-for, or compile with the C++11 version (or greater) of the C++ Standard selected.

This may mean adding a flag like -std=c++11 to your compile command, but it varies by compiler and development environment.

I would also advise configuring your compiler to adhere to strict standards if you want portable code. For example, with GCC or clang this can be done by adding -pedantic-errors to the compile command.