#include <stack>
#include <iostream>
using namespace std;
class Test {
public:
Test() {
cout << "オブジェクト生成" << endl;
};
~Test() {
cout << "オブジェクト削除" << endl;
};
};
void main() {
int stop;
cout << "Stack" << endl;
stack<Test*> sTest;
sTest.push(new Test);
delete sTest.top;
sTest.pop();
cin >> stop;
}
std::stackの末尾要素のdeleteについて
std::stackの末尾要素のdeleteについて
Re: std::stackの末尾要素のdeleteについて
ああああああああああああああああ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!僕がバカでしたあああああああああああああああああああああああああああああああああ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!出来ました!!ありがとうございます!!ありがとうございます!!!!!