fork download
  1. #include <boost/shared_ptr.hpp>
  2. #include <string>
  3. void broadcast(std::string *buf){
  4. boost::shared_ptr<std::string> msg(buf);
  5. }
  6.  
  7. void broadcast(const char *buf){
  8. broadcast(new std::string(buf));
  9. }
  10.  
  11. int main () {
  12. broadcast("Hello");
  13. }
  14.  
Success #stdin #stdout 0.01s 2852KB
stdin
Standard input is empty
stdout
Standard output is empty