w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • C, C++
  • C++
  • Containers

std::set::begin

iterator begin();
const_iterator begin() const;
const_iterator cbegin() const;
(since C++11)

Returns an iterator to the first element of the container.

If the container is empty, the returned iterator will be equal to end().

Parameters

(none).

Return value

Iterator to the first element.

Exceptions

(none) (until C++11)
noexcept specification:
noexcept
(since C++11)

Complexity

Constant.

Example

See also

end cend
returns an iterator to the end
(public member function)
Links:
  • http://en.cppreference.com/w/cpp/container/set/begin
doc_CPP
doc_CPP
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
std::unordered_set::begin iterator begin(); (since C++11) const_iterator begin() const; (since C++11) const_iterator cbegin() const; (since C++11) Returns
std::unordered_set::begin(int) local_iterator begin( size_type n ); (since C++11) const_local_iterator begin( size_type n ) const; (since C++11) const_local_iterator c
std::set Defined in header <set> template< class Key, class Compare = std::less<Key>, class Allocator = std::allocator<K
std::set::set (1) explicit set( const Compare& comp = Compare(), const Allocator& alloc = Allocator() ); (until C++14) set() : set(
std::set::empty bool empty() const; Checks if the container has no elements, i.e. whether begin() == end(). Parameters (none). Return value true if the


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions