// заголовочный файл
#include <exception>
#ifndef CRYPTSERVEXCEPTION_H
#define CRYPTSERVEXCEPTION_H
class cryptServException
{
public:
//these are classes defined in a class
class CantOpenForEncryption : public std::exception
{
public:
const char* what();
};
class DecryptKeyMismatch : public std::exception
{
public :
const char* what();
};
#endif // CRYPTSERVEXCEPTION_H
есть неявный конструктор, который выдает ошибку. Я просто не могу понять причину, так как мы можем оставить тело конструктора пустым, если в нем есть какой-то код, я не знаю, что должно, надеюсь Теперь у вас есть проблема.
// файл CPP
#include "cryptServException.h"
//rest are just classes that are for exceptions
cryptServException::cryptServException()
{
// this constructor declaration gives the error : definition of implicitly- declared 'constexpr myException::myException()'|
}
//this is just a class in another class
cryptServException::CantOpenForEncryption : public exception
{
public :
const char* what()
{
return " Can't Open File For Encryption ";
}
};
//this is just a class in another class
cryptServException::DecryptKeyMismatch : public exception
{
public :
const char* what()
{
return " Incorrect Decryption Key ";
}
};
Я не могу определить причину ошибки для вышеупомянутого неявного конструктора.
спасибо за помощь
Подскажите, пожалуйста, если я добавлю конструктор в файл .cpp, какой код должен быть помещен в его тело