View Single Post
  #4 (permalink)  
Old October 24th, 2004, 11:16 PM
C@uark C@uark is offline
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

Gill,

you would want to declare a string object in main also

#include <iostream.h>
#include <string> // C++ standard string class


void GetInput(string &); // Function Prototype

int main()
{
// sting object definition, initialized with Peter
string word (Peter);

cout << "Original word:" << word << endl;
GetInput(&word);
cout << "Finally:" << word << endl;
return 0;
}
Reply With Quote