Posts

Showing posts with the label clion

CLion and Yaml-cpp: how can i build yaml-cpp with clion in windows

Image
Clash Royale CLAN TAG #URR8PPP CLion and Yaml-cpp: how can i build yaml-cpp with clion in windows I had install yaml-cpp in linux successfully, then i want to install yaml-cpp in windows with clion. But when I build or install it, some errors happened. Such as: yaml-cpp yaml-cpp In file included from D:/github/yaml-cpp/test/gtest-1.8.0/googletest/include/gtest/internal/gtest-linked_ptr.h:74:0, from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-port.h:53, from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/gmock-actions.h:46, from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/gmock.h:58, from D:githubyaml-cpptestgte...

CLion saying a C++ class function doesn't exist when it does

Image
Clash Royale CLAN TAG #URR8PPP CLion saying a C++ class function doesn't exist when it does I have a class called Computer and in it has a function called setPos . Clion refuses to acknowledge the existence of getPos or any other function I put in there except for the constructor. Computer setPos getPos snippet from main.cpp Computer gateway = Computer::Computer("Gateway"); gateway.setPos(&neighbor,&supermarket, nullptr, nullptr); Computer.hpp class Computer { public: Computer::Computer(string name); void Computer::setPos(Computer* up, Computer* right, Computer* down, Computer * left); string Computer::getName(); string name; Computer* up = nullptr; Computer* down = nullptr; Computer* right = nullptr; Computer* left = nullptr; }; Computer.cpp #include "Computer.hpp" Computer::Computer(int level, bool hidden, string name, int money) { this->name = name; } void Computer::setPos(Computer* up, Computer* right,...