fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. void func(string const *const s)
  6. {
  7. cout << *s << endl;
  8. }
  9.  
  10. typedef const string constring;
  11.  
  12. int main()
  13. {
  14. func(&(constring("hello")));
  15. }
Success #stdin #stdout 0.01s 2856KB
stdin
Standard input is empty
stdout
hello