Vector de impressão CPP
for(int i = 0; i < vec.size(); i++)
std::cout << vec[i] << ' ';
just-saved-you-a-stackoverflow-visit
for(int i = 0; i < vec.size(); i++)
std::cout << vec[i] << ' ';
#include <vector> // vector
#include <iostream> // cout
using namespace std;
int main()
{
vector<int> tmp = {1,2,3,4,5,6};
for (auto i : tmp) {
cout << i << ' ';
}
}
for (int i = 0; i < vec.size(); i++)
{
for (int j = 0; j < vec[i].size(); j++)
{
cout << vec[i][j];
}
}
int i;
const int N = 10;
int vett[N];
for(i = 0; i < N; i ++)
printf("\n%d",vett[i]);