Nec C++ Quiz — 0045

According to the C++17 standard


Nec C++ Quiz — 0044

Nec C++ Quiz — 0043

resim: Hunters in the snow (Pieter Bruegel)
std::vector<int> ivec(100);
std::for_each(ivec.begin(), ivec.end(), [](int &r){r * = 2;});


Nec C++ Quiz — 0042

According to the C++17 standard



#include <vector>
#include <string>
typedef int Word;
typedef int *Iptr;
typedef int SMatrix10[10][10];
typedef int(*Fptr)(int, int);
typedef const std::vector<std::string> Csvec;
using Word = int;
using Iptr = int *;
using SMatrix10 = int [10][10];
using Fptr =…

namespace Csd {
namespace Game {
namespace Models {
class ModelBase {
//...
};
}
}
}

std::vector<int> ivec(100);
for_each(ivec.begin(), ivec.end(), [](int &r){r * = 2;});

Necati Ergin

C & C++ Instructor, Trainer & Mentor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store