Access element of pointed std::vector
Posted
by user146780
on Stack Overflow
See other posts from Stack Overflow
or by user146780
Published on 2010-06-05T21:43:39Z
Indexed on
2010/06/05
21:52 UTC
Read the original article
Hit count: 123
I have a function where I provide a pointer to a std::vector.
I want to make x = to vector[element] but i'm getting compiler errors.
I'm doing:
void Function(std::vector<int> *input)
{
int a;
a = *input[0];
}
What is the right way to do this? Thanks
© Stack Overflow or respective owner