- [Instructor] Now let's solve a basic problem.…Let's say we want to keep track…of the websites we have visited in a web browser.…The simple purpose of this could be to implement…the back button we all know.…We're also interested in keeping the current web address…always available through a function.…So let's see how the C++ SDL can help.…Here we have some skeleton code for this application.…Let's take a look at the main function at 9 10.…
A website history for implementing a back button…is a typical example of the behavior of a stack.…Here we'll use a stack of strings…which we'll call back stack.…Next we have the usual temporary variable…where the user will enter the web addresses.…This it the String object temp.…And on line 14, we have while loop…where we will present a menu to the user.…So we have two options presented here,…one is visit URL to enter one particular web address…and the second option is back as to simulate…that the user has pressed the back button.…
So after we take in the user input,…we evaluate it to see if the user entered exit,…
- Why the STL is important
- Containers and iterators
- Vectors and lists
- Stacks and dequeues
- Associative containers
Skill Level Advanced
1. The Standard Template Library
2. Vectors and Lists
3. Stacks, Queues, and Deques
4. Associative Containers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.