Я пытался получить доступ к псевдониму из другого файла, так называемого «cph.h», и использовать его в текущем файле «wsManager.h» в Visual Studio, но компилятор выдает следующую ошибку< /p>
Error C2653 'json': is not a class or namespace name
Файл cph.h
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "mt4Manager.h"
#include "wsManager.h"
using json = nlohmann::json;
wsManager.h
#pragma once
#include "chp.h"
#include "spdlog/sinks/basic_file_sink.h"
#include "spdlog/spdlog.h"
#include
#include
namespace beast = boost::beast;
namespace http = beast::http;
namespace websocket = beast::websocket;
namespace ssl = boost::asio::ssl;
namespace asio = boost::asio;
using tcp = boost::asio::ip::tcp;
class wsManager
{
.....
void postProcessData(beast::flat_buffer bufferData) {
// Error here
json json_buffer_data = json::parse(beast::buffers_to_string(bufferData.data()));
Подробнее здесь: https://stackoverflow.com/questions/783 ... her-file-c