code
category::category ( const std::string p_name , std::string p_ImagePath) :
m_name { p_name },
m_ImagePath {p_ImagePath }
{
}
header
#pragma once
#include <string>
class category
{
public:
const int i;
explicit category ( const std::string p_name ,const std::string p_ImagePath);
~category ( );
std::string GetName ( );
private:
std::string m_name;
std::string m_ImagePath;
};
I allways get errors due to assignment opperator
Fehler 1 error C2280: 'booking &booking::operator =(const booking &)' : attempting to reference a deleted function C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include\utility 53
if i try to use a const member variable or a const static member variable in a class.
I tried const i = 5;
static const i = 5;
and const i; -> i gets initialized in constructor.
Nothing works, how can i fix this? And i cant use constexpr due to vs2013 does not assist it :(
I already checked some questions on Stackoverflow but everything was with constexpr