I have commands in a string something like:
string comm = "int x; cout << \"Digite um número\"; cin << x;";
My idea is to execute the commands that are in this string , having the result as if I had typed:
int x
cout <&l...
I would like to know if in the code below (the variable 'p') is a Pointer to a Pointer Array?
#include <stdio.h>
int main () {
double valor = 7;
double *balance[5] = {&valor, &valor, &valor, &valor, &valor};
double...
I'm having trouble removing the first and last elements of this circular list.
// Created by Thiago Cunha on 25/05/2017.
//
#include "double_linked_list_circular.h"
int count = 0;
List* init() {
return NULL;
}
List* insertInit(List* li...
I want to create a struct where there will be a vector of structs ... The way I thought about doing this was something like this:
typedef struct{
char *teste_str;
int teste_int;
}TESTE_A;
typedef struct{
TESTE_A **t;...
In order to automate some backups that need to be done routinely, then I thought of using an app in dos to do, however I'm having problems compiling the executable because it seems to me that the function system() only accepts cha...
Below is an example of the application of the qsort function, using a compare function:
#include <iostream>
#include <cstdlib>
#include <climits>
using namespace std;
int compare (const void * a, const void *...
This loop realizes Log_base_2 of an integer value, at the end the result is available in the variable i .
Why does a shift of the form valor >> 1 have no effect compared to valor = valor >> 1 which by the way...
I recently read a Peter Hutterer post explaining about a new protocol called inputfd that is intended to forward a file descriptor directly to other processes without the composer's interaction.
I was curious, how is it possible to pass a f...
Why when dropping a level on the pointer pointer ** lista / * lista we should use the parentheses: ( * lista ) , I ask the question because I saw in some internet examples that they did not use and also in an old book that I...
I'm doing a project where I use many vector-type vectors. But working with array vectors is easier, so I did the following function:
// add.cpp
vector <string> sAdd (string In[])
{
vector <string> Out;
Out.resize (sizeof(In))...