I'm a beginner in C ++ programming, so I apologize in advance.
As this question is answered here , you can use std::vector , 2D ( grid) with push_back() directly ( variavel[indice].push_back(...) ) incrementing unidimensio...
I have the following
while(!feof(f)){
(*ptr).push_back(carro());
fscanf (f, "%d", (*ptr)[add].id);
fscanf (f, "%s", (*ptr)[add].marca);
add++;
}
Where * ptr is & vector, a vector of a struct car, I have alrea...
Well, I read Bjarne's book on programming and I'm learning programming there, I'm in chapter 5 that's about mistakes, at the end of the chapter there's a list of exercises for me to do, I came across an exercise in that I have to create a kind of...
What is the most efficient c / c ++ framework I can use to create and store cycles, so that I ensure that repeated cycles are not stored?
I have a struct CYCLE, such that:
struct CICLO {
vector<Arco> rota;
float COST;
}
struc...
The function only returns the memory address, how do I get it to return the contents, not the memory address?
#include <iostream>
#include <time.h> /// por causa de srand()
#include <stdlib.h> // para poder gerar os pesos...
I have a .dll inside it that has a BUBBLE function that returns a double.
The problem is that BUBBLE has a vector<double> in the argument.
extern "C" minhaDLL_API double BOLHA(vector<double> OI);
In fact it has a ex...
Good morning, I'm presenting a problem that I have no idea why, I've tried to ask other people, none have discovered the real reason for the error and how to fix it. Well my teacher, asked to implement a system with which opens a txt file that c...