-4

how to fill a dynamic array with input from the console? Im begginer
and can't understand it.

some help will make my day :|

  • 1
    `#include #include int main{ std::vector values(4); for(auto& value : values ) { std::cin >> value; }}` So hava a look at [std::vector](https://en.cppreference.com/w/cpp/container/vector) and [std::cin](https://en.cppreference.com/w/cpp/io/cin) and [range based for loops](https://en.cppreference.com/w/cpp/language/range-for). And no this is not "advanced" C++. Most of the examples out there are out-dated. – Pepijn Kramer Jan 24 '23 at 09:01

1 Answers1

-1

You can realize this in several ways. Have a look on following post may it will help you..

Using scanf() in C++ programs is faster than using cin?