я получаю:fpermissive класс класс constructorstack: fpermissive на конструктор
../src/stack.cpp: In function ‘int main()’:
../src/stack.cpp:34:28: error: invalid conversion from ‘stack*’ to ‘int’ [-fpermissive]
stack stos1 = new stack(10);
^
../src/wieze-oig.cpp:10:2: error: initializing argument 1 of ‘stack::stack(int)’ [-fpermissive]
stack(const int size){
initializing argument 1 of ‘stack::stack(int)’ [-fpermissive]
В этом коде:
class stack
{
int stacksize;
stack(const int size)
{
this->stacksize = size;
this->data = new char[stacksize];
this->ctr = 0;
}
}
Как я могу это исправить?