class Class_ListPerson{
public:
void addnewlist(){
Class_ListPerson object;
m_vector.push_back(object);
}
private:
std::vector<Class_ListPerson> m_vector;
char* m_name;
uint8_t m_data;
};
#include <iostream>
#include <string>
const unsigned int maxSize = 100;
int main()
{
std::string str1;
std::string str2;
unsigned int equals = 0;
unsigned int percentageOfMatches = 0;
for (unsigned int i = 0; i < maxSize; i++)
{
//тут push_back твоих значений для str1 и str2(заполнение строк)
//тут сравнение строк
if (str1[i] == str2[i])
{
equals++;
}
}
percentageOfMatches = maxSize / equals;
std::cout << percentageOfMatches ;
}
#include <iostream>
class rabbit
{
public:
rabbit(int value)
{
m_value = value;
}
void SetValue(int value)
{
m_value = value;
}
int GetValue()
{
return m_value;
}
private:
int m_value;
};
int main()
{
rabbit mrRabbit(10);
std::cout << mrRabbit.GetValue();
mrRabbit.SetValue(100);
std::cout << mrRabbit.GetValue();
return 0;
}
filename.c_str();
bool isOk;
if (isOk == true)
{
std::cout << "result1";
}
else
{
std::cout << "result2";
}
size_t answer;
if (answer == 1)
{
std::cout << "result1";
}
else if(answer == 2)
{
std::cout << "result2";
}
StringBuffer sb;
PrettyWriter writer(sb);
writer.StartObject();
writer.String(_T("paths"));
writer.StartArray();
std::vector<String>::iterator itm;
for(itm = m_paths.begin(); itm != m_paths.end(); ++itm)
{
writer.String(*itm);
}
return writer.EndArray();
writer.EndObject();
std::string fullJsonString = sb.GetString();