Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
37f1b8b8
Unverified
Commit
37f1b8b8
authored
Sep 21, 2023
by
Paul Jurczak
Committed by
GitHub
Sep 21, 2023
Browse files
Update How-To-Emit-YAML.md (#976)
parent
d046eea3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
docs/How-To-Emit-YAML.md
docs/How-To-Emit-YAML.md
+3
-9
No files found.
docs/How-To-Emit-YAML.md
View file @
37f1b8b8
...
@@ -155,15 +155,9 @@ produces
...
@@ -155,15 +155,9 @@ produces
We overload
`operator <<`
for
`std::vector`
,
`std::list`
, and
`std::map`
, so you can write stuff like:
We overload
`operator <<`
for
`std::vector`
,
`std::list`
, and
`std::map`
, so you can write stuff like:
```
cpp
```
cpp
std
::
vector
<
int
>
squares
;
std
::
vector
<
int
>
squares
=
{
1
,
4
,
9
,
16
};
squares
.
push_back
(
1
);
squares
.
push_back
(
4
);
std
::
map
<
std
::
string
,
int
>
ages
=
{{
"Daniel"
,
26
},
{
"Jesse"
,
24
}};
squares
.
push_back
(
9
);
squares
.
push_back
(
16
);
std
::
map
<
std
::
string
,
int
>
ages
;
ages
[
"Daniel"
]
=
26
;
ages
[
"Jesse"
]
=
24
;
YAML
::
Emitter
out
;
YAML
::
Emitter
out
;
out
<<
YAML
::
BeginSeq
;
out
<<
YAML
::
BeginSeq
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment