Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
#include
using namespace std; int main() { // Create a stack of strings called cars stack
cars; // Add elements to the stack cars.push("Volvo"); cars.push("BMW"); cars.push("Ford"); cars.push("Mazda"); // Remove the last/latest added element (Mazda) cars.pop(); // Access the top element (Now Ford) cout << cars.top(); return 0; }
Ford