printArray()
Output / Text AreaDescription
Prints the contents of a std::vector to the console with indices.
Syntax
void printArray(std::vector<T> a)
Parameters
| Name | Type | Description |
|---|---|---|
| a | std::vector | the vector to print |
Returns
voidRelated
Under the Hood
From Processing.h:
template<typename T> inline void printArray(const std::vector<T>& a) {
for (size_t i=0; i<a.size(); i++) std::cout << "[" << i << "] " << a[i] << "\n";
}