void keyboardEventOccurred (const pcl::visualization::KeyboardEvent &event, void* viewer_void) { if (event.getKeySym() == "s" && event.keyDown()) { char buf[256]; char *cmd = &buf[0]; sprintf(cmd, "./%s_%04d.pcd\0", filename, count_pcd); std::string str01(cmd, std::find(cmd, cmd + 128, '\0')); pcl::io::savePCDFileASCII (str01, *pc); std::cout << "Point Cloud Captured: " << str01 << "\n"; count_pcd++; } return; }
int main() { std::string str01("Eine Textfolge"); std::string str02 = str01; std::string str03{"C++11-like"}; // C++11 std::string str04 = "So geht es auch"; std::string str05(4, 'X'); std::string str06; std::cout << "Einen String bitte: "; std::getline(std::cin, str06); std:: cout << "Ihre Eingabe: " << str06 << std::endl; std::cout << "str01 = " << str01 << std::endl; std::cout << "str02 = " << str02 << std::endl; std::cout << "str03 = " << str03 << std::endl; std::cout << "str04 = " << str04 << std::endl; std::cout << "str05 = " << str05 << std::endl; }
int main() { std::string str01("abba"); std::string str02("aabaaaa"); std::cout << minVal(str01, str02) << std::endl; std::cout << minVal("aaa", "abaaa") << std::endl; }