mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Merge pull request #23 from ulikoehler/master
Add README syntax highlighting
This commit is contained in:
commit
e8ffe7ef96
@ -20,7 +20,7 @@ To use the library in your program, include msgpack.hpp header and link "msgpack
|
|||||||
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
```CPP
|
||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -49,6 +49,8 @@ To use the library in your program, include msgpack.hpp header and link "msgpack
|
|||||||
// If the type is mismatched, it throws msgpack::type_error.
|
// If the type is mismatched, it throws msgpack::type_error.
|
||||||
obj.as<int>(); // type is mismatched, msgpack::type_error is thrown
|
obj.as<int>(); // type is mismatched, msgpack::type_error is thrown
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
API documents and other example codes are available at the [wiki.](http://redmine.msgpack.org/projects/msgpack/wiki)
|
API documents and other example codes are available at the [wiki.](http://redmine.msgpack.org/projects/msgpack/wiki)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user