String类型
#include <string>
#include <iostream>
using namespace std;
int main(void)
{
string str("Hello Bluetooth"); /* string类型变量初始化 */
cout << str << " size is:" << str.size() <<endl; /* 计算长度用.size() */
while(1);
return 0;
}
String类型
#include <string>
#include <iostream>
using namespace std;
int main(void)
{
string str("Hello Bluetooth"); /* string类型变量初始化 */
cout << str << " size is:" << str.size() <<endl; /* 计算长度用.size() */
while(1);
return 0;
}