gcc ddwrtcg.c -o ddwrtcg
Makefile:8: *** missing separator (did you mean TAB instead of 8 spaces?). Stop
process_begin: CreateProcess(NULL, g++ -c -o ddwrtcg.o ddwrtcg.cpp, ...) failed.
ddwrtcg.o: file not recognized: File format not recognized
Можно ли описать функцию, которая в зависимости от аргумента темплейта вызывала бы метод f1() или f2()?
template <int f>
int F(A *a, int b) {
abort();
}
template<>
int F<1>(A *a, int b) {
return a->f1(b);
}
template<>
int F<2>(A *a, int b) {
return a->f2(b);
}
static uv_sem_t sem;
uv_work_t *baton;
void work(uv_work_t* task) {}
void after(uv_work_t* task, int status) {
printf("after\n");
delete task;
uv_sem_post(&sem);
}
int process()
{
baton = new uv_work_t();
if (uv_sem_init(&sem, 0) < 0) {
perror("uv_sem_init");
return -1;
}
uv_queue_work(uv_default_loop(), baton, work, after);
printf("before\n");
uv_sem_wait(&sem);
uv_sem_destroy(&sem);
return 0;
}
//шифруем блок
if (1 != EVP_EncryptUpdate(ctx, out_buffer, &len, buffer, BUFF_SIZE))
handleErrors();
printf("substr encr is %s\n", (char *)out_buffer);
//запоминаем результат
e_param->result.append((char *) out_buffer);
index++;
e_param->data_len -= BUFF_SIZE;
An operator function shall either be a non-static member function or be a non-member function and have at
least one parameter whose type is a class, a reference to a class, an enumeration, or a reference to an enu-
meration. It is not possible to change the precedence, grouping, or number of operands of operators. The
meaning of the operators =, (unary) &, and , (comma), predefined for each type, can be changed for spe-
cific class and enumeration types by defining operator functions that implement these operators. Operator
functions are inherited in the same manner as other base class functions
std::_Fwd_list_const_iterator<T> cur
e_param.text = (unsigned char *) data->c_str();
...
e_param->text[e_param->data_len] = '\0';
if (1 != EVP_EncryptUpdate(ctx, e_param->result, &len, e_param->text, e_param->data_len))
К примеру, если в символьном типе цифра, как мне узнать, что там цифра или буква?
Если можно, максимальное количество комментариев.