• Создайте класс Integer с одним элементом данных типа int, конструктором по умолчанию с одним параметром, функциями получения и установки значения. Используйте класс Integer и шаблонные классы auto_ptr , shared_ptr, unique_ptr для создания объекта и протестируйте его.на языке Си++
    Помогите!!!

Ответы 5

  • main.cpp
    • Автор:

      mohammed
    • 6 лет назад
    • 0
  • #include "IntegerTest.hpp"#include <iostream>#include <string>using std::cin;using std::cout;using std::endl;const std::string exitWord = "exit";int main(){ cout << "Run integer class testing..." << endl; auto testResult = integerTest::testIntegerClass(); cout << "Testing finished with \""; cout << (testResult ? "Success" : "Failed"); cout << "\" status." << endl << endl; std::string userAnswer;
  • while (true) { cout << "Enter \"" << exitWord << "\" to close app." << endl; std::getline(cin, userAnswer); if (exitWord == userAnswer) { break; } } cout << "Closing..." << endl; return 0;}
    • Автор:

      clarke
    • 6 лет назад
    • 0
  • Sorry, в коментах перепутал содержание Integer.cpp и IntegerTest.сpp
  • Спасибо за отметку "дучший ответ" и нажатую кнопочку "спасибо" тут и в моем аккаунте.
  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years