begin

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic
Visual Studio 2012

Retrieves an iterator to the first element in a specified container.

template<class Container>
    auto begin(Container& cont)
        -> decltype(cont.begin());
template<class Container>
    auto begin(const Container& cont) 
        -> decltype(cont.begin());
template<class Ty, class Size>
    Ty *begin(Ty (&array)[Size]);
cont

A container.

array

An array of objects of type Ty.

The first two template functions return cont.begin().

The third template function returns &array[0].

Header: <iterator>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.