为什么按回车输入还不停止
```c++
#include<iostream>
#include<cstring>
using namespace std;
class Set
{
public:
Set(){
this->length=0;
memset(this->Setnum,0,sizeof(Setnum));
cout<<"默认构造函数"<<endl;
}
Set(int *n){
for(int i=0;i<_msize(n)/sizeof(*n);i++)
this->addnum(n[i]);
cout<<"普通构造函数"<<endl;
}
Set(Set &s){
length=s.length;
for(int i=0;i<s.length;i++)
Setnum[i]=s.Setnum[i];
cout<<"拷贝构造函数"<<endl;
}
~Set(){
cout<<"析构函数"<<endl;
}
void addnum(int num);
void delnum(int num);
void shownum();
Set jiaoji(Set &s2);
Set bingji(Set &s2);
Set chaji(Set &s2);
bool equals1(Set &s2);
bool ifinclude(Set &s2);
bool ifempty();
int numsize();
void beempty();
private:
int Setnum[100];
int length=0;
};
void Set::addnum(int num){
int flag=0;
for(int i=0;i<length;i++){
if(Setnum[i]==num){
flag=1;
break;
}
}
if(flag==0){
Setnum[length]=num;
length++;
}
}
void Set::delnum(int num){
int n=length;
while(n--){
if(Setnum[n]==num)
break;
}
for(int i=n;i<length-1;i++){
Setnum[i]=Setnum[i+1];
}
length--;
}
void Set::shownum(){
for(int i=0;i<length;i++){
cout<<Setnum[i]<<" ";
}
cout<<endl;
}
Set Set::jiaoji(Set &s2){
Set s;
for(int i=0;i<this->length;i++){
s.Setnum[i]=this->Setnum[i];
s.length=this->length;
}
for(int i=0;i<s2.length;i++){
s.addnum(s2.Setnum[i]);
}
return s;
}
Set Set::bingji(Set &s2){
Set s;
for(int i=0;i<this->length;i++){
for(int j=0;j<s2.length;j++){
if(this->Setnum[i]==s2.Setnum[j]){
s.Setnum[i]==s2.Setnum[j];
s.length++;
}
}
}
}
Set Set::chaji(Set &s2){
int flag=0;
Set s,s3;
s3=this->bingji(s2);
for(int i=0;i<this->length;i++){
flag=0;
for(int j=0;j<s3.length;j++){
if(this->Setnum[i]==s3.Setnum[j]){
flag=1;
break;
}
}
if(flag==0){
s.Setnum[s.length]=this->Setnum[i];
s.length++;
}
}
return s;
}
bool Set::equals1(Set &s2){
if(this->length!=s2.length)
return false;
for(int i=0;i<this->length;i++){
if(this->Setnum[i]!=s2.Setnum[i])
return false;
}
return true;
}
bool Set::ifinclude(Set &s2){
Set *s3=new Set();
*s3=this->bingji(s2);
if(s3->length==this->length||s3->length==s2.length)
return true;
else
return false;
}
bool Set::ifempty(){
if(this->length==0)
return true;
else
return false;
}
int Set::numsize(){
return this->length;
}
void Set::beempty(){
memset(Setnum,0,sizeof(Setnum));
this->length=0;
}
int main()
{
Set s1;
char *ch='ch';
int num;
cout<<"Enter multiple numbers"<<endl;
while(ch!='endl'){
cin>>num;
s1.addnum(num);
cin>>ch;
}
s1.shownum();
}
```