📄 chapter6-9.cpp
字号:
//文件名:CHAPTER6-9.cpp
#pragma warning(disable:4786)
#include <iostream.h>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
PrintIt (char* & StringToPrint) { cout << StringToPrint << endl; }
void main (void)
{ vector<char* > FruitAndVegetables;
FruitAndVegetables.push_back("carrot");
FruitAndVegetables.push_back("pumpkin");
FruitAndVegetables.push_back("potato");
FruitAndVegetables.push_back("apple");
FruitAndVegetables.push_back("pineapple");
for_each (FruitAndVegetables.begin(), FruitAndVegetables.end(), PrintIt);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -