周五(作业例,复习函数)
#include <vector> #include <iostream> int main() { std::vector<int> my_vector = {1, 2, 3}; my_vector[1] = 10; std::cout << my_vector[1] << std::endl; // 输出10 return 0; }
#include <vector> #include <iostream> int main() { std::vector<int> my_vector = {1, 2, 3}; my_vector[1] = 10; std::cout << my_vector[1] << std::endl; // 输出10 return 0; }