Jack S Jack S - 1 year ago 110
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download