How may I clear whole array in that example?
#include <iostream.h>
#include <string.h>
#include<conio.h>
using namespace std;
class C_String
{
public:
char* Input();
void Output( );
private:
char array[30];
};
char* C_String::Input()
{
cin.getline(array,30);
}
void C_String::Output()
{
cout<<array;
}
int main()
{
C_String some_data;
char array[30];
cout<<"enter sopme input ";
some_data.Input();
some_data.Output();
getch();
return 0;
}
thanks