Skip to content

[sheep1500] 1520 completed #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions 1520_sheep1520.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>
#include <string>

using namespace std;

int main() {
string s0("Initial string");
// constructors used in the same order as described above:
//�⺻ �����ڸ� �̿��� s1 ��ü ����
string s1;
//s0 ��ü�� //s0 ��ü�� �����ϴ� s2 ��ü ����
string s2(s0);
//s0 ��ü //s0 ��ü �� 8��° ���ں��� 3���� ���ڷ� �ʱ�ȭ�ϴ� s3 ��ü ����
string s3(s0,8,3);
//"A character sequence"�� //"A character sequence"�� ���ڿ� �� 6���� ���ڷ� �ʱ�ȭ�ϴ� s4 ��ü ����

string s4("A character sequence",6);
//"Another character sequence"�� //"Another character sequence"�� ���ڿ��� �ʱ�ȭ�ϴ� s5 ��ü ����
string s5("Another character sequence");
//'x'���� //'x'���� 10���� �ʱ�ȭ�ϴ� s6 ��ü ����
string s6(10, 'x');
string s7(s0.begin(), s0.end() - 4);
s1 = ' ';
//template class Iterator //template class Iterator Iterator�� ���� �� ���۰� ������ �ʱ�ȭ�ϴ� ��ü s7 ����
cout << "s1: " << s1 << "\ns2: " << s2 << "\ns3: " << s3;
cout << "\ns4: " << s4 << "\ns5: " << s5 << "\ns6: " << s6;
cout << "\ns7: " << s7 << endl;
return 0;

}
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# -
# -
## 자료구조 스터디
[sheep1500](https://github.com/1500sheep/DataStructure-Study)

- sheep1500
- Q.1520
-char 문제를 풀어봅시다