]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - examples/hello_world.cc
Adjust the name of the library to match upstream
[ext/sigc++-2.0.git] / examples / hello_world.cc
1 /* Copyright 2003, The libsigc++ Development Team
2  *
3  *  Assigned to the public domain.  Use as you wish without
4  *  restriction.
5  */
6
7 #include <iostream>
8 #include <string>
9
10 #include <sigc++/sigc++.h>
11
12 void on_print(const std::string& str)
13 {
14   std::cout << str;
15 }
16
17 int main()
18 {
19   sigc::signal<void, const std::string&> signal_print;
20   
21   signal_print.connect( sigc::ptr_fun(&on_print) );
22   
23   signal_print.emit("hello world\n");
24
25   return 0;
26 }