Begin end cbegin cend crbegin crend

whats the difference in all these vector functions
im not able to get it through cplusplus refernce,
pls make it clear in a simple language

begin: it gives you an iterator which contains value of address of begining element.
end: it gives you an iterator which contains value of address of end element.

cbegin it gives you an constant iterator which contain value of address of begining element
cend: it gives you an constant iterator which contain value of address of end element

constant iterator means Iterator cannot modify the contents of the vector. it is used only for printing

whats crbegin and crend

rbegin means it will give reverse iterator contains value of last element .
reverse iterator means on increasing iterator it will move back.
for ex vector contains 11 12 13 14 15
for (auto it = v.rbegin(); it != v.rend(); it++)
cout << *it << " ";
it will print
15 14 13 12 11

rend returns a reverse iterator pointing to the theoretical element right before the first element in the array container. it is always use with rbegin as done above

i hope u understand if yes then hit a like

#include
#include
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector < vector> v(m);

for (int i = 0;i < n;i++) {
	for (int j = 0;j < m;j++) {
		int temp;
		cin >> temp;
		v[i].push_back(temp);
	}
}
for (int i = 0;i < v.size();i++) {

for (auto it = v[i].begin();it != v[i].end();–it) {
cout << *it << ", ";
}
}
}

whats wrong in that above code

#include
#include
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector < vector> v(m);

for (int i = 0;i < n;i++) {
for (int j = 0;j < m;j++) {
int temp;
cin >> temp;
v[i].push_back(temp);
}
}
for(auto it:v){
for(auto element:it){
cout<<element<<" ";
}
cout<<endl;
}

/*for (auto i = 0;i < v.size();i++) {

for (auto it = v[i].begin();it != v[i].end();–it) {
cout << it << ", ";
}
}*/
return 0;
}

use for each loop