fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. void print(const char *t)
  6. {
  7. const void *p = static_cast<const void *>(t);
  8. cout << p << endl;
  9. }
  10.  
  11. int main() {
  12. string abc("something");
  13. print(abc.c_str());
  14. print(abc.substr(4).c_str());
  15. abc = "...";
  16. return 0;
  17. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
0xa017014
0xa017034