vendredi 31 mars 2017

C++ When to use std:: with vectors and other data types?

In looking at some tutorials I have seen people use vectors like std::vector < class > functions, like this:

std::vector< int > organize(std::vector<int> list);

But, in other examples of code, specifically this one, people do this for the parameters:

void printVector(vector<int> a);

I am curious of what the difference between these two is, and in what circumstance I'd use each.

Aucun commentaire:

Enregistrer un commentaire