"Исключение, созданное по адресу 0x00007FF779B38CBB в noahsArkApp.exe: 0xC0000005: Нарушение прав доступа для чтения местоположения 0xFFFFFFFFFFFFFFFF."
Программа завершается с (процессом 20984) с кодом -1073741819.
Что еще более странно, каждый раз это происходит, мой антивирус Norton показывает всплывающее окно «Потенциальная угроза заблокирована». В деталях описано действие: «подозрительный процесс попытался изменить безопасность файла, защищенного Data Protector». Что здесь может происходить? Как исправить это исключение? Нужно ли отключать Norton?
#include
#include
#include
#include // for smart pointers? Googled for a fix to memory issue but still having problems

#include // for srand() and rand() functions
#include // for time() function
using namespace std;
// enum classes to limit options for type and gender
enum class Type { MAMMAL, BIRD, FISH };
enum class Gender { FEMALE, MALE };
class Animal {
protected:
Type type;
string species;
Gender gender;
int ageInMonths;
public:
Type getType() { return type; }
string getName() { return species; }
Gender getGender() { return gender; }
int getAgeInMonths() { return ageInMonths; }
Animal(Type _type, string _name, Gender _gender, int _ageInMonths) : type(_type), species(_name), gender(_gender), ageInMonths(_ageInMonths) {};
virtual void ageOneMonth() {
ageInMonths++;
}
virtual void giveBirth(vector& animals) {
// Default implementation does nothing
}
virtual void identifyAnimal() const {
string genderStr = (gender == Gender::MALE) ? "male" : "female";
cout
Подробнее здесь: https://stackoverflow.com/questions/784 ... struggling