void FSMBuilder::createStatesFromJson(PrimitiveTool* primitiveTool, rapidjson::Document& doc)
{
	if (doc.HasMember("PrimitiveTool") && doc["PrimitiveTool"].HasMember("State") && doc["PrimitiveTool"]["State"].IsArray()) {
		const Value& states = doc["PrimitiveTool"]["State"];
		for (SizeType i = 0; i < states.Size(); ++i) {
			const Value& stateVal = states[i];
			state* StateObj = new state();

			if (stateVal.HasMember("Name") && stateVal["Name"].IsString()) {
				StateObj->getdata(stateVal["Name"].GetString(), stateVal["EntryMethodName"].GetString());
			}

			if (stateVal.HasMember("Event")) {
				if (stateVal["Event"].IsArray()) {
					const Value& events = stateVal["Event"];
					for (SizeType j = 0; j < events.Size(); ++j) {
						const Value& eventVal = events[j];
						Event* EventObj = new Event();

						if (eventVal.HasMember("Name") && eventVal["Name"].IsString()) {
							string eventName = eventVal["Name"].GetString();
							string actionType = eventVal.HasMember("ActionType") ? eventVal["ActionType"].GetString() : "";
							string actionParam = eventVal.HasMember("ActionParam") ? eventVal["ActionParam"].GetString() : "";
							EventObj->getdata(eventName, actionType, actionParam);
							StateObj->Add(EventObj);
						}
					}
				}
			}
			primitiveTool->Add(StateObj);
		}
	}
}

i am getting error

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	C2059	syntax error: '}'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	37		
Error (active)	E0020	identifier "Value" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	9		
Error (active)	E0020	identifier "SizeType" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error (active)	E0065	expected a ';'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error (active)	E0864	i is not a template	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error (active)	E0439	expected a '>'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error (active)	E0020	identifier "Value" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	11		
Error (active)	E0020	identifier "state" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error (active)	E0020	identifier "StateObj" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error (active)	E0079	expected a type specifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error (active)	E0020	identifier "Value" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	20		
Error (active)	E0065	expected a ';'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error (active)	E0864	j is not a template	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error (active)	E0439	expected a '>'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error (active)	E0020	identifier "Value" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	22		
Error (active)	E0020	identifier "string" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error (active)	E0065	expected a ';'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error (active)	E0065	expected a ';'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error (active)	E0065	expected a ';'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error (active)	E0020	identifier "eventName" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Error (active)	E0020	identifier "actionType" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Error (active)	E0020	identifier "actionParam" is undefined	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Warning	C4005	'FSMBUILDER_H': macro redefinition	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.h	3		
Warning	C4005	'FSMBUILDER_H': macro redefinition	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.h	3		
Error	C4430	missing type specifier - int assumed. Note: C++ does not support default-int	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	9		
Error	C2143	syntax error: missing ';' before '&'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	9		
Error	C2065	'states': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	9		
Error	C2065	'SizeType': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2146	syntax error: missing ';' before identifier 'i'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2143	syntax error: missing ';' before '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2143	syntax error: missing ')' before '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2059	syntax error: '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2065	'i': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2065	'states': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2065	'i': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2059	syntax error: ')'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	10		
Error	C2059	syntax error: 'const'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	11		
Error	C2065	'state': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error	C2065	'StateObj': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error	C2061	syntax error: identifier 'state'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	12		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	14		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	14		
Error	C2065	'StateObj': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	15		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	15		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	15		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	18		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	19		
Error	C4430	missing type specifier - int assumed. Note: C++ does not support default-int	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	20		
Error	C2143	syntax error: missing ';' before '&'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	20		
Error	C2065	'events': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	20		
Error	C2065	'stateVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	20		
Error	C2065	'SizeType': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2146	syntax error: missing ';' before identifier 'j'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2143	syntax error: missing ';' before '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2143	syntax error: missing ')' before '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2059	syntax error: '='	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2065	'j': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2065	'events': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2065	'j': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2059	syntax error: ')'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	21		
Error	C2059	syntax error: 'const'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	22		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	25		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	25		
Error	C2065	'string': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error	C2146	syntax error: missing ';' before identifier 'eventName'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error	C2065	'eventName': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	26		
Error	C2065	'string': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error	C2146	syntax error: missing ';' before identifier 'actionType'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error	C2065	'actionType': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	27		
Error	C2065	'string': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error	C2146	syntax error: missing ';' before identifier 'actionParam'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error	C2065	'actionParam': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error	C2065	'eventVal': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	28		
Error	C2065	'eventName': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Error	C2065	'actionType': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Error	C2065	'actionParam': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	29		
Error	C2065	'StateObj': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	30		
Error	C2065	'StateObj': undeclared identifier	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	35		
Error	C2143	syntax error: missing ';' before '}'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	37		
Error	C2143	syntax error: missing ';' before '}'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	38		
Error	C2059	syntax error: '}'	FsmImplementation	C:\Users\1038586\Downloads\FsmImplementation11142024\FsmImplementation\FsmImplementation\FSMBuilder.cpp	38