防火墙端口等均已正确设置。我替换了一个实例,突然无法ssh进入。
串行控制台显示错误:
#include <iostream>
#include <conio.h> // _getch()
#include <string>
#include <ctype.h>
using namespace std;
#define VMSG_LEN_PRICE 0.03 // Price of Voice Message
#define TMSG_LEN_PRICE 0.02 // Price of Text Message
// Base Class
class qMsg
{
private:
float messagePrice; // Final Return Price of Messages Voice/Text
public:
qMsg() {
messagePrice = 0.0f;
}
// Getter
int getMessagePrice()
{
return messagePrice;
}
// Setter
void setMessagePrice(float price)
{
messagePrice = price;
}
};
// 1st Derived Class, Text Message
class tMsg : public qMsg
{
private:
float textMessageInCharacters;
public:
tMsg() {
textMessageInCharacters = 0.0f;
}
// Setter
void setTextMessageLength(int textLength)
{
textMessageInCharacters = textLength;
}
// Getter
int getTextMessageLength()
{
return textMessageInCharacters;
}
};
// 2nd Derived Class, Voice Message
class vMsg : public qMsg
{
private:
float voiceMessageInMinutes;
public:
vMsg() {
voiceMessageInMinutes = 0.0f;
}
// Getter
int getVoiceMessageLength()
{
return voiceMessageInMinutes;
}
// Setter
void setVoiceMessageLength(int voiceLength)
{
voiceMessageInMinutes = voiceLength;
}
};
int main()
{
string usrInput; // User Input
string tMessage; // Text message string
int vMessage_Min; // Voice message length in minutes
try
{
qMsg commServices; // Voice messaging service
tMsg textService; // Text messaging service
// Menu output for user.
printf("Select an option:\n\nT. Text Message\nV. Voice Message\n\nOption: ");
getline(cin, usrInput);
// Get text message from user
if (usrInput == "t") {
printf("Input your message then hit [ENTER] when done: \nMessage: ");
getline(cin, tMessage);
textService.setTextMessageLength(tMessage.size());
cout << "GET MESSAGE LENGTH : ";
cout<<textService.getTextMessageLength();
cout << endl;
}
else if (usrInput == "v")
{
// Return minutes for voice message
printf("Input the length of your voice message: ");
cin >> vMessage_Min;
}
}
// Catch exception
catch (exception& ex) {
// Throw exception
cout << ex.what();
// Pause screen wait for user input
_getch();
}
// Exit
system("pause");
return 0;
}
我现在无法替换实例。有人可以给我一些指示吗?