samedi 5 août 2023

How to get rid of warning about range-based loops in c++? [closed]

So I am a really new programmer. Just started with c++ and I am learning range-based loops. It compiled the code correctly, but with warning that those loops are an extension so can I do anything about that? Or do I leave it like this?

Tried to compile and I got this vscode warning:

main.cpp:8:20: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]

Loop: for (int number: numbers)

What should I do?

Aucun commentaire:

Enregistrer un commentaire