[ create a new paste ] login | about

Link: http://codepad.org/VlGasCqm    [ raw code | output | fork ]

hecomi - C++, pasted on Jun 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str1("un");
	string str2("ko");
	str1 += str2;
	cout << "str1: " << str1 << endl;

	if (str1 == "unko") {
		cout << "一致" << endl;
	} else {
		cout << "不一致" << endl;
	}

	cout << "文字数は: " << str1.size() << endl;

	return 0;
}


Output:
1
2
3
str1: unko
一致
文字数は: 4


Create a new paste based on this one


Comments: