Jack S Jack S - 2 months ago 26
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?


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