projects
/
cpp_sandbox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
First commit
[cpp_sandbox.git]
/
Sandbox
/
AggregateInitializations.cpp
1
#include
"AggregateInitializations.h"
2
3
#include <iostream>
4
using namespace
std
;
5
6
namespace
AggregateInitializations
7
{
8
struct
B
9
{
10
double
q
;
11
};
12
13
struct
S
:
B
14
{
15
int
i
;
16
float
f
;
17
};
18
19
}
20
21
void
AggregateInitializations
::
tests
()
22
{
23
S s
{ {
42.123
},
1
,
2.32
f
};
// Initialization of base class.
24
cout
<<
"s.q = "
<<
s
.
q
<<
endl
;
25
}