SlideShare a Scribd company logo
[KOSSA] C++ Programming - 18th Study - STL #4
[KOSSA] C++ Programming - 18th Study - STL #4
3
4
 typedef std::basic_string<char> string
 typedef std::basic_string<wchar_t> wstring
5
#include <iostream>
#include <string>
std::string str("Hello!");
const char* p1 = "Hello!";
const char* p2 = p1 + 6;
std::string s1;
std::string s2("Hello!");
std::string s3("Hello!", 2);
std::string s4(5, 'H');
std::string s5(str.begin(), str.end());
std::string s6(p1, p2);
6
std::string s1("Hello");
s1 += ' ';
s1 += "C++";
s1.push_back(' ');
s1.append("world");
std::cout << s1 << std::endl;
7
std::string s1("Hello!");
const char *sz;
sz = s1.c_str();
std::cout << "sz : " << sz << std::endl;
[KOSSA] C++ Programming - 18th Study - STL #4
9
10
#include <iostream>
#include <stack>
using namespace std;
void main()
{
stack<int> st;
st.push(1);
st.push(2);
st.push(3);
int count = st.size();
for (int i = 0; i < count; i++)
{
cout << st.top() << endl;
st.pop();
}
}
[KOSSA] C++ Programming - 18th Study - STL #4
12
13
#include <iostream>
#include <queue>
using namespace std;
void main()
{
queue<int> qu;
qu.push(1);
qu.push(2);
qu.push(3);
int count = qu.size();
for (int i = 0; i < count; i++)
{
cout << qu.front() << endl;
qu.pop();
}
}
[KOSSA] C++ Programming - 18th Study - STL #4
15

More Related Content

PDF
Anadhikar-probesh-Robindranath_Thakur
PDF
Tablalaboratorio
PDF
Python and rust 2018 pythonkorea jihun
DOCX
Server
TXT
PPTX
A Prettier Printer
PDF
CS50 Lecture1
Anadhikar-probesh-Robindranath_Thakur
Tablalaboratorio
Python and rust 2018 pythonkorea jihun
Server
A Prettier Printer
CS50 Lecture1

Similar to [KOSSA] C++ Programming - 18th Study - STL #4 (20)

PDF
Look Ma, “update DB to HTML5 using C++”, no hands! 
PPTX
C Programming Language Part 11
PDF
C program
PDF
array, function, pointer, pattern matching
PPT
Computer Programming- Lecture 6
PDF
Data structure week 3
PPT
C++ Strings.ppt
PPTX
Lecture 1 string functions
DOCX
#include #include #include using namespace std;v
PDF
c programming
PPT
strings
PPTX
Module-2_Strings concepts in c programming
PPSX
Strings
PDF
2 BytesC++ course_2014_c8_ strings
PPTX
programming fundamentals
PPTX
Strings in C language
DOCX
Lab loop
PDF
C programms
PDF
String
PPS
An approach to Programming Contests with C++
Look Ma, “update DB to HTML5 using C++”, no hands! 
C Programming Language Part 11
C program
array, function, pointer, pattern matching
Computer Programming- Lecture 6
Data structure week 3
C++ Strings.ppt
Lecture 1 string functions
#include #include #include using namespace std;v
c programming
strings
Module-2_Strings concepts in c programming
Strings
2 BytesC++ course_2014_c8_ strings
programming fundamentals
Strings in C language
Lab loop
C programms
String
An approach to Programming Contests with C++
Ad

More from Seok-joon Yun (20)

PDF
Retrospective.2020 03
PDF
Sprint & Jira
PPTX
Eks.introduce.v2
PDF
Eks.introduce
PDF
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
PDF
아파트 시세,어쩌다 머신러닝까지
PPTX
Pro typescript.ch07.Exception, Memory, Performance
PPTX
Doing math with python.ch07
PPTX
Doing math with python.ch06
PPTX
Doing math with python.ch05
PPTX
Doing math with python.ch04
PPTX
Doing math with python.ch03
PPTX
Doing mathwithpython.ch02
PPTX
Doing math with python.ch01
PPTX
Pro typescript.ch03.Object Orientation in TypeScript
PDF
C++ Concurrency in Action 9-2 Interrupting threads
PDF
Welcome to Modern C++
PDF
[2015-07-20-윤석준] Oracle 성능 관리 2
PDF
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
PDF
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
Retrospective.2020 03
Sprint & Jira
Eks.introduce.v2
Eks.introduce
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
아파트 시세,어쩌다 머신러닝까지
Pro typescript.ch07.Exception, Memory, Performance
Doing math with python.ch07
Doing math with python.ch06
Doing math with python.ch05
Doing math with python.ch04
Doing math with python.ch03
Doing mathwithpython.ch02
Doing math with python.ch01
Pro typescript.ch03.Object Orientation in TypeScript
C++ Concurrency in Action 9-2 Interrupting threads
Welcome to Modern C++
[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
Ad

Recently uploaded (20)

PDF
System and Network Administraation Chapter 3
PDF
System and Network Administration Chapter 2
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
top salesforce developer skills in 2025.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Nekopoi APK 2025 free lastest update
System and Network Administraation Chapter 3
System and Network Administration Chapter 2
Odoo Companies in India – Driving Business Transformation.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
ai tools demonstartion for schools and inter college
2025 Textile ERP Trends: SAP, Odoo & Oracle
How to Choose the Right IT Partner for Your Business in Malaysia
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PTS Company Brochure 2025 (1).pdf.......
top salesforce developer skills in 2025.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Operating system designcfffgfgggggggvggggggggg
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Upgrade and Innovation Strategies for SAP ERP Customers
Nekopoi APK 2025 free lastest update

[KOSSA] C++ Programming - 18th Study - STL #4