diff --git a/1520_sheep1520.cpp b/1520_sheep1520.cpp new file mode 100644 index 0000000..1911377 --- /dev/null +++ b/1520_sheep1520.cpp @@ -0,0 +1,30 @@ +#include +#include + +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; + +} \ No newline at end of file diff --git a/README.md b/README.md index 7ae76b0..8fe9233 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# - \ No newline at end of file +# - +## 자료구조 스터디 +[sheep1500](https://github.com/1500sheep/DataStructure-Study) + +- sheep1500 + - Q.1520 + -char 문제를 풀어봅시다 \ No newline at end of file