Questions tagged as 'c++'

1
answer

Is this code fragment redundant?

Recently I did a C test where I had to complete a code to remove items from a queue, follow the code with the correct answer highlighted: typedef struct No { int dado; struct No *proximo; }; typedef struct Fila { struct No *inicio; st...
asked by 14.08.2018 / 14:53
1
answer

How to split files in c ++

I'm starting my studies in C ++, and I'm not able to split into different files if they can help me. Primary code #include <iostream> #include "Celular.h" using namespace std; int main(int argc, char** argv) { Celular motorola();...
asked by 06.07.2018 / 17:31
3
answers

Error when printing values, values that are printed have nothing to do with those that were saved

It turns out that the gets functions do not return any kind of value.   And the getMedidasPC (); always returns the values -858993460-858993460 regardless of what is written Clientes.h void getMedidasPC(); void setLargPC(int x); int getLargPC...
asked by 06.07.2018 / 17:03
1
answer

What software to use to generate an image of a giant graph?

I have a program in c ++, done with the representation of graphs with adjacency list, however, there are more than 2 million nodes in it. Is there any software that has a text format, which I can generate from my program, and import into that so...
asked by 29.05.2018 / 21:56
1
answer

Error with Template

Please, could you help me!? Errors are for all headers in the stack.cpp file that references stack.h. It involves use of Templates. Battery code.h: #ifndef PILHA_H #define PILHA_H #include <iostream> //#include <cstdlib>...
asked by 22.05.2018 / 16:46
1
answer

Something like GetAsyncKeyState () for Linux systems, is there something similar?

I searched a lot on the internet and could not find something like GetAsyncKeyState () that is not in the windows.h library. Is there a library or some way forward that allows "direct" control of things like knowing if a key is being pressed, or...
asked by 31.05.2018 / 00:47
1
answer

Structure for search and quick insert c ++

I have a program that adds multiple elements to a vector. The amount is getting larger than 1000000, I need to add and when there is already the element that I am adding, it returns the memory location. It's working, but it's getting really slow...
asked by 15.05.2018 / 19:23
1
answer

Problem in implementation of Binary Tree

Good evening, everyone. I'm trying to implement a binary tree with insert methods (insert, insertLeft and insertRight) and print (print). Everything goes well until I try to insert a node in the tree through the insert method, I can create th...
asked by 03.05.2018 / 04:48
1
answer

How to assign split strings from one vector to one element of another vector. Ex: v [oldLine] [OldLine]

#include <iostream> #include <vector> #include <string> /*Função para fazer split*/ std::vector<std::string> split(std::string s, char c) { std::string buff{""}; std::vector<std::string> v; for(auto n:s...
asked by 22.04.2018 / 21:57
1
answer

Painting pixels in c ++

Hello, I needed a function to paint pixels on the console. I've got a solution here but when compiling gives me the following error:    C: \ Users \ user \ AppData \ Local \ Temp \ ccORhjHu.o: test.cpp: (.text + 0xa1): undefined reference...
asked by 05.05.2018 / 13:59