fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void strPointerTest(const string* const pStr)
  5. {
  6. cout << *(pStr);
  7. }
  8.  
  9. int main() {
  10. // your code goes here
  11. string animals[] = {"cat", "dog"};
  12. strPointerTest(animals);
  13. return 0;
  14. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
cat