-3
共有ポインタを作成しようとしていて、これを引き起こしている可能性のある「型指定子が期待されていますか?スマートポインタの構文新規作成
#ifndef ROOM_HPP
#define ROOM_HPP
#include <iostream>
#include <string>
#include <memory>
#include "Pocket.hpp"
using namespace std;
class Room
{
protected:
Room *up;
Room *down;
Room *left;
Room *right;
string name;
shared_ptr<Pocket> p(new Pocket());
このコンテキストでイニシャライザに '()'を使用することはできません。代わりに '{}'を使う –