[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/container/list/front [Back]  [Original]

std::list::front cppreference.com
cppreference.com

std::list::front

cppreference.com
<tbody> </tbody>
reference front();
const_reference front() const;

.

front .

()

c, c.front() - *c.begin().

front std::list<char>:

#include <list>
#include <iostream>
 
int main()
{
    std::list<char> letters {'o', 'm', 'g', 'w', 't', 'f'};
 
    if (!letters.empty()) {
        std::cout << "  - '" << letters.front() << "'.\n";
    }  
}

:

  - 'o'.

.


(public -) []

Web Proxy Viewer  |  New URL  |  Original Page