(z[i].birth >= ageyoungest)
.if (z[i].education == "master" || z[i].education == "specialist" || z[i].education == "bachelor")
. Для массивов это просто сравнение адреса массива с адресом вкомпилированной в программу строчки, что автоматически даёт false. Используйте str(n)cmp.else if (z[i].education != "master" || z[i].education != "specialist" || z[i].education != "bachelor")
. Оно автоматически выполнено.delete[] employees;
test* next
) и указатель на голову (test* head = NULL
).a >= b && a >= c && c <= b
второе не нужно. Можно просто писать: c <= b && b <= a
.if (a >= b) {
// куча сравнений
} else {
// ещё одна куча
}
std::string command;
char data1 = 'F';
char data2 = 'C';
command = std::string("color ") + data1 + data2;
system(command.c_str());
while (cin >> val)
подразумевает, что мы ждём конца консоли.// Add C includes here
#if defined __cplusplus
// Add C++ includes here
#include <stdlib>
#include <iostream>
#include <vector>
#include <QApplication> // Qt includes
#include <QPushButton>
#include <QLabel>
#include "thirdparty/include/libmain.h"
#include "my_stable_class.h"
...
#endif
std::string commandLine = console.getSomeCommandLine();
Command command;
std::string error;
if (!command.parse(commandLine, error)) {
console.err().writeln(error);
return;
}
Program* program = system.findProgram(command.programName);
if (!program) {
console.err().writeln("Bad command or file name");
return;
}
Console redirectedConsole = console.redirectStreams(command);
program->exec(redirectedConsole, system, command.getArguments());
const std::vector<std::string>& getArguments() const;
const std::vector<std::string>& getOptions() const;
connect(&Button, &QPushButton::clicked,
&Base, [&]() {
// тут код
});
namespace curl {
std::atomic<size_t> nLib(0);
class _Lib
{
public:
bool isIn = false;
~_Lib();
};
_Lib lib;
void addLib()
{
int q = ++nLib;
if (q == 1) {
lib.isIn = true;
q = ++nLib;
curl_global_init(CURL_GLOBAL_ALL);
}
//std::cout << "Added lib, now " << q << std::endl;
}
void releaseLib()
{
int q = --nLib;
if (q == 0) {
//std::cout << "Cleaned up lib" << std::endl;
curl_global_cleanup();
} else {
//std::cout << "Released lib, now " << q << std::endl;
}
}
_Lib::~_Lib()
{
if (isIn)
releaseLib();
}
}
curl::Curl::Curl()
{
addLib();
fData.handle = curl_easy_init();
}
curl::Curl::~Curl()
{
if (fData.handle)
curl_easy_cleanup(fData.handle);
releaseLib();
}