What will be printed out as a result of the following code execution?
#include <iostream>
using namespace std;

class B {
    public: B(char c) { cout << c;}

class D {
    public : B bB, bA, bC;
    D(void) : bA('a'), bB('b'), bC('c') { }

int main() {
    D dInstance;
    return 1;
Class members are initialized in the order they are declared. $ 12.6.2 clause 5 (clause 6 for C ++ 0x) of the standard.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Зарегистрируйся сейчас
или Подпишись на будущие тесты