Questions tagged as 'c++'

1
answer

Clone a struct without copying the memory address

I need to copy struct problema1 to struct problema2 , but when doing the way you are in the program below, when I change the struct problema2 , you are also changing the struct problema1 . The way I did it by copying the...
asked by 08.07.2016 / 18:08
2
answers

How to get the serial number or ID of a USB stick on the MS-DOS system?

I've tried using some tools to get hardware information in DOS, but they did not have source code for free use. I need a code solution that returns me the serial number or ID in the MS-DOS environment.     
asked by 14.03.2016 / 21:50
1
answer

How to create an abstract class in C ++?

In C ++ use virtual .cpp file #ifndef TETES_H #define TETES_H class Tetes { public: Tetes(); virtual ~Tetes(); virtual void exibeDados(); protected: private: }; #e...
asked by 15.03.2016 / 15:41
2
answers

Append a char to each iteration for in c ++

How do I for each loop of a to add a char to a word, eg: I have the word "char" and within a for each loop I want to add a letter "h" after the "h" of "char" and in case it would look like this "char" loop1 ---> "chhar" "chhar" lace2 --- >...
asked by 24.02.2016 / 13:50
1
answer

Random of Enumerator

I'm not able to do a random enumerator. enum Notas {A=10, B=22, C=31, D=44, E=56}; It has this solution, but I need the enumerator values and here it is returning the rest of the calculation. enum Notas {A=10, B=22, C=31, D=44, E=56, ULTI...
asked by 09.03.2016 / 18:00
1
answer

How to load array items in the list box?

I have TCheckListBox and when it is checked I save the options in an Array. I need to click on a "List" button, Array elements (marked options of TCheckListBox ) are listed in TListBox . It should look something like this:...
asked by 13.01.2016 / 15:27
2
answers

How to find out the size of an array of characters?

#include <iostream> #include <string> #include <locale.h> #include <stdio.h> using std::cout; using std::cin; using std::endl; using std::string; int main(){ setlocale(LC_ALL,"Portuguese"); int n =0; cout...
asked by 20.02.2016 / 03:40
1
answer

QT Creator - How to open a window with directories for user to select text file? C ++

I have in a code that makes a listing of teachers with their proper graduations that is stored with the txt file, making due opening with variable ifstream, using open with the name of the file on disk. So I call the class constructor in mainwin...
asked by 23.11.2015 / 20:10
3
answers

Bucket sort + Thread

I'm having the following error in this code: #define TAM 10000 /*Tamanho do vetor*/ #define NUM 10000 /*base para gerador de numeros aleatorios*/ using std::cout; using std::cin; using std::endl; pthread_t thread[TAM]; void gerarVet(long*);...
asked by 05.11.2015 / 13:42
1
answer

How to compile c ++ with SFML library within the project itself

Hello, people who like to program. I'm having a problem that until now researching in the donkey dad (Google) I could not solve. I am doing a little game as part of the evaluation of programming language 1. I do not know how to properly link (co...
asked by 30.09.2015 / 03:10