Questions tagged as 'c++'

1
answer

.ini file reading

Is it possible to do variable readings in arquivos.ini with C ++? Ex: host = "localhost" name = "username" pass = "password" port = 1010 When reading from this file I set it to ifstream . ifstream dados; dados.open("arquiv...
asked by 31.08.2015 / 22:58
1
answer

Error "source file not compiled"

I'm using Dev-C ++. I compile and when I go to run the message:    Uncompiled source file What am I doing wrong? #include <stdio.h> main() { float lado, area ; cout<< "digite o lado"; cin>> lado; area=...
asked by 27.09.2015 / 01:16
1
answer

Best way to distribute a program that uses a shared library

I wrote a program that uses a library called curlpp . The program is very simple and all it does is make an HTTP request that returns a JSON (use curlpp to accomplish this request), parse this JSON (use a jsoncons for this) and print on the s...
asked by 14.07.2015 / 02:22
1
answer

What is the reason why a vector with no set size does not work?

Here's if you create a vector: Thus int Vetor[0]; works #include <iostream> using namespace std; int main() { int vetor [1]; vetor[0] = 12; cout << vetor[0] << endl; } Thus int Vetor[]; does...
asked by 02.08.2017 / 23:14
1
answer

Convert string char * to std :: string

I have the following code: void splitstr(std::string &modulo, std::string &nmodulo, int &fk) { string frase = modulo; string aux = ""; stringstream strs; for (int i = 0; i < frase.length(); i++) { swi...
asked by 29.09.2015 / 16:55
1
answer

How to use an API in C ++?

I've been researching on several sites that explain how to use an API, but for some reason I'm doing it wrong. I would like to know how to use the Windows WM_PASTE API to block the Paste of the mouse (ctrl + v) in a TComboBox. I'm using Embarcad...
asked by 21.06.2015 / 03:18
1
answer

Instead of maps how to use a struct vector for the C ++ problem? [duplicate]

First I have a struct strcuct Ficha{ int resgistro; float pontuacao; }Fichas[100]; is the following I will randomly read data but a die always in the list will start with the number that is not integer bound 0.5/...
asked by 27.05.2015 / 00:51
2
answers

Repeat loop is not running

I am making a code where you have a vector (with 15 positions) with predetermined values (10 any values and 5 times the value 0), and where the user will enter a new value to go to the end of the list ( substituting 0). It seems to me that ev...
asked by 22.03.2015 / 17:59
2
answers

Problems with if and conditions

I am making a code that gets three values and sorts them from highest to lowest. As a condition, when the numbers are repeated, an error message is displayed and the program should quit. If the numbers are different, it skips this if and...
asked by 09.03.2015 / 12:55
1
answer

C ++ Class Destroyer Called in the middle of the code

I'm getting a bit deeper into using C ++, and I'm having a hard time migrating an application that uses callbacks and a singleton to manage settings. While initializing the code still in the main function, I create the singleton responsible f...
asked by 08.10.2016 / 08:54