Re: ffd

作者: purincess (purincess)   2013-04-26 20:22:54
都2013年了還在寫這種C程式 寫個C++11才潮好嘛
#include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using std::cin;
using std::endl;
using std::vector;
using std::generate;
using std::for_each;
int main(){
auto o = [](char a, char b, char c) -> void { cout << a << b << c << " ";};
char t;
cout << "請輸入一個英文字母:";
cin >> t; // assume input is valid
vector<char> cs(t - 'A' + 1);
generate(cs.rbegin(), cs.rend(), [&t]() -> char { return t
作者: ck574b027 (荒圍!定厝!賊!妹!)   2013-05-26 06:22:00
看那精美的system("pause");你覺得有可能會用c++11嗎XD
作者: purincess (purincess)   2013-06-09 10:37:00
對不起我錯惹QQ

Links booklink

Contact Us: admin [ a t ] ucptt.com