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 <stdlib.h>
#include <string>
int main()
{
int number;
std::string one = "0.00000024 BTC";
std::string two = "0.00000238 BTC";
std::string three = "0.00002381 BTC";
std::string four = "0.00023810 BTC";
std::string five = "0.00238096 BTC";
std::string six = "0.02380955 BTC";
std::cout << "Random number is: " << rand() % 10000 << std::endl;
std::cin >> number;
if(number <= 9885)
{
std::cout << "You win: " << one;
}
if(number >= 9886 && number <= 9985)
{
std::cout << "You win: " << two;
}
if(number >= 9985 && number <= 9993)
{
std::cout << "You win: " << three;
}
if(number >= 9994 && number <= 9997)
{
std::cout << "You win: " << four;
}
if(number >= 9998 && number <= 9999)
{
std::cout << "You win: " << five;
}
if(number == 10000)
{
std::cout << "You win: " << six;
}
}
#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();