fork download
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. void print_str( const std::string* str ) {
  5. std::cout << *str << std::endl;
  6. }
  7.  
  8. int main() {
  9. std::string str = "Hello world!";
  10. print_str( &str );
  11. return 0;
  12. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Hello world!