Jack S Jack S - 5 days ago 6
C++ Question

Best way to declare array size in C++

What is the best way to declare an array size in C++?

Maybe something that grows dynamically?

string lineArr[];


I know without putting declaring an array size, the code above outputs an error, but is there a way to make it dynamic?

Answer

Yeah. Use std::vector and never look back.