Skip to content

Commit 1208eb9

Browse files
committed
Update example.cpp - also use std::cout
Signed-off-by: Kipras Melnikovas <[email protected]>
1 parent a380ba8 commit 1208eb9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

example.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ g++ -std=c++11 ./example.cpp ./src/*.cpp -o example.out
1313
*
1414
*/
1515

16+
#include <iostream> // std::cout
1617
#include "./src/xstate.cpp"
1718

1819
int main() {
@@ -54,13 +55,13 @@ int main() {
5455
xs::Interpreter *toggleMachine = xs::interpret(machine)
5556
->logInfo()
5657
->onStart([]() {
57-
printf("let's go!\n");
58+
std::cout << "let's go!\n";
5859
})
5960
->onTransition([](xs::Interpreter *self) {
6061
self->logInfo();
6162
})
6263
->onStop([]() {
63-
printf("oh no we stopped c:\n");
64+
std::cout << "oh no we stopped c:\n";
6465
})
6566
->start();
6667

0 commit comments

Comments
 (0)