⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringtest2.cpp

📁 c++高级编程代码 c++高级编程代码
💻 CPP
字号:
// stringtest2.cpp

#include <string>
#include <iostream>

using namespace std;

int main(int argc, char** argv)
{
  string str1 = "Hello";
  string str2 = "World";
  string str3 = str1 + " " + str2;

  cout << "str1 is " << str1 << endl;
  cout << "str2 is " << str2 << endl;
  cout << "str3 is " << str3 << endl;

  if (str3 == "Hello World") {
    cout << "str3 is what it should be" << endl;
  } else {
    cout << "hmmm... str3 isn't what it should be" << endl;
  }

  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -