#include <iostream.h>
#include <string.h>
int const MaxSize = 50;
Class CString
{
public:
CString ( ); //Constructor initializes array to NULL.
int GetStrLen( ); //Gets the length of the string.
void ClearStr( ); //Clears the array to NULL.
void DisplayStr( ); //Displays the string as written.
void SetStrVal(char*); //Assigns the array a new string value.
char GetStrMid( ); //Returns the "middle" character of the
//string. If the string length is even
//then the right-most character of the
//"left" half is returned.
char* GetString( ); //Returns the object's private data.
private:
char data[30]; //Accessible ONLY thru member functions
};
/*** Write the implementations of the class here. ***/
/*** End of class implementations *******************/
int main(void)
{
CString first_string; // First object of type CString
CString second_string; // Second object of type CString
char string[MaxSize]; // The string that user enters
cout << "Please enter the first string < " << MaxSize
<< " characters in length: ";
// Insert code to get the first string from the user (use cin.getline).
cin.getline(string,MaxSize);
HERE IS MY QUESTION
// Insert code to initialize first_string to the inputted string value.
how may I do that?
thanks