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
OpenDAS
dlib
Commits
e9e0b65d
Commit
e9e0b65d
authored
Nov 12, 2012
by
Davis King
Browse files
simplified example program
parent
e1ce4b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
examples/config_reader_ex.cpp
examples/config_reader_ex.cpp
+3
-11
No files found.
examples/config_reader_ex.cpp
View file @
e9e0b65d
...
@@ -15,14 +15,6 @@
...
@@ -15,14 +15,6 @@
#include <vector>
#include <vector>
// Here I'm just making a typedef of the config reader we will be using. If you
// look at the documentation you will see that there are two possible config_reader
// types we could use here. The other one is a thread-safe version for use in an
// application that needs to access a global config reader from multiple threads.
// But we aren't doing that here so I'm using the normal kind.
typedef
dlib
::
config_reader
cr_type
;
using
namespace
std
;
using
namespace
std
;
using
namespace
dlib
;
using
namespace
dlib
;
...
@@ -64,7 +56,7 @@ user2 {
...
@@ -64,7 +56,7 @@ user2 {
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
void
print_config_reader_contents
(
void
print_config_reader_contents
(
const
c
r_type
&
cr
,
const
c
onfig_reader
&
cr
,
int
depth
=
0
int
depth
=
0
);
);
/*
/*
...
@@ -78,7 +70,7 @@ int main()
...
@@ -78,7 +70,7 @@ int main()
{
{
try
try
{
{
c
r_type
cr
(
"config.txt"
);
c
onfig_reader
cr
(
"config.txt"
);
// Use our recursive function to print everything in the config file.
// Use our recursive function to print everything in the config file.
print_config_reader_contents
(
cr
);
print_config_reader_contents
(
cr
);
...
@@ -121,7 +113,7 @@ int main()
...
@@ -121,7 +113,7 @@ int main()
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
void
print_config_reader_contents
(
void
print_config_reader_contents
(
const
c
r_type
&
cr
,
const
c
onfig_reader
&
cr
,
int
depth
int
depth
)
)
{
{
...
...
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