journaldev.com journaldev.com

2D Vectors in C++ - A Practical Guide 2D Vectors

Also referred to as vector of vectors, 2D vectors in C++ form the basis of creating matrices, tables, or any other structures, dynamically. Before arriving on the topic of 2D vectors in C++, it is advised to go through the tutorial of using single-dimensional vectors in C++.Table of Contents1 Including the Vector header file2 Initializing 2D vectors in C++2.1 Specifying the size for 2D Vector Initialization3 Iterators for 2D vectors4...

journaldev.com journaldev.com

Command line arguments in C / C++

In this article, we’ll be looking at how we can use command line arguments in C / C++.Command Line arguments are very useful if you want to pass any input strings to your main program, from the command line.These arguments are passed as parameters to the main() function.Let’s look at how we can use these effectively.Table of Contents1 Why should we use command line arguments?2 Command Line Arguments in C/C++ – The...