#include<iostream> #include<string> int main() { using namespace std; string word = "?ate"; for(char ch = 'a';word != "mate";char++){ cout << word << endl; word[0] = ch; } cout << "After loop ends, word is " << word << endl; return 0; }
Sample 5.12:comstr2.cpp
最新推荐文章于 2019-09-15 15:16:16 发布