Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
How to return an iterator
Print
Pages: [
1
]
Author
Topic: How to return an iterator (Read 1373 times)
0 Members and 2 Guests are viewing this topic.
rasen58
Newbie
Posts: 19
How to return an iterator
«
on:
October 30, 2012, 01:56:25 pm »
I want to return an iterator from the beginning of a vector from another file.
std
::
vector
<
sf
::
Sprite
>
bigAsteroidV
;
bigAsteroidV.
begin
(
)
;
What would the function header be for that?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: How to return an iterator
«
Reply #1 on:
October 30, 2012, 02:06:40 pm »
std
::
vector
<
sf
::
Sprite
>
::
iterator
pouet
(
)
;
(read/write access)
std
::
vector
<
sf
::
Sprite
>
::
const_iterator
pouet
(
)
const
;
(read-only access)
But returning an iterator is usually not a good solution. What are you trying to do?
Logged
Laurent Gomila - SFML developer
masskiller
Sr. Member
Posts: 284
Pointers to Functions rock!
Re: How to return an iterator
«
Reply #2 on:
October 30, 2012, 02:53:18 pm »
Also here you could answer this kind of questions on your own.
http://www.cplusplus.com/reference/stl/
It's the documentation for all std C++ containers that use templates one way or the other as well as a bunch of other useful stuff.
Logged
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!
Finally back into the programming world!
rasen58
Newbie
Posts: 19
Re: How to return an iterator
«
Reply #3 on:
October 30, 2012, 02:55:46 pm »
Never mind, i realized i didnt need it. thanks anyway
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
How to return an iterator
anything