Create an object of class String, s1, from namespace Savitch and an object, s2, of class String, s1, from namespace Teague. Use a member function to give to each object a C-string message that tells of which namespace the class is a member.
Given the namespace groupings that contain class definitions:
```
{
class String
{
public:
char* fetchString( );
void storeString(char[]);
private:
char str[ 100 ];
int length;
};
}
namespace Teague
{
class String
{
public:
char* fetchString( );
void storeString(char[]);
private:
char str[ 100 ];
int length;
};
}
```
```
// The above namespace groupings are included here.
int main()
{
Savitch::String Sav_String;
Sav_String.storeString("From namespace Savitch");
Teague::String Teag_String;
Teag_String.storeString("From namespace Teague");
}
```
You might also like to view...
The methods in an object that are used to initialize an object's fields with starting values are called _________.
Fill in the blank(s) with the appropriate word(s).
In discriminative listening, a support agent's purpose is to learn about the user, such as their knowledge level.
Answer the following statement true (T) or false (F)