IT認定試験向けの情報を提供しております

IT専門者になりたいの夢 「 http://www.pass4test.jp 」

CPP 合格問題 & CPP 模擬対策

NO.1 What happens when you attempt to compile and run the following code?#include vector#include iostream#include algorithmusing namespace std;templateclass Tstruct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) { outval" "; } };struct Add {int operator()(int & a, int & b) {return a+b;}};int main() {int t[]={1,2,3,4,5,6,7,8,9,10};vectorint v1(t, t+10);vectorint v2(10 [...]