Jack S Jack S - 11 months ago 64
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 Source

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