Questions tagged as 'c++'

1
answer

How to get a pointer from a class c ++ vector

How do I get a pointer from a class c ++ vector? For example I have a vector a; , how do I get a pointer to just one vector element?     
asked by 13.04.2018 / 19:54
2
answers

How to clean the screen in C ++?

How to clean the screen in C ++? I have already put the library: ** # include < stdlib.h> ** and the code: system ("cls") , but gives the error: " sh: 1: cls: not found ". How do I resolve this?     
asked by 13.04.2018 / 00:11
1
answer

Convert Int to String in C ++

How do I make the String resultado receive the int value of cont3 and the char value of c[cont] ? resultado=" "; resultado=resultado+to_string(**cont3**)+to_string(**c[cont1**]); I tried to use to_string() b...
asked by 03.05.2018 / 12:55
1
answer

Google test compare vector C ++

I am putting together a project and trying to use google test to compare the result of some functions. The problem is that my functions return double vectors and I can only compare double or integer in google test. I try to make one: EXPECT...
asked by 24.01.2018 / 15:36
1
answer

Save std :: cout to file

I need to adapt some exits from the program Ripser . More precisely, I need to do the following: 1. Running the program in an example, we have: ./ripser examples/random16.lower_distance_matrix whose output is distance matrix with 1...
asked by 17.11.2017 / 01:48
1
answer

How to have performance in systems? [closed]

How does the issue of performance in software, websites, etc. work? Facebook transpiled PHP into C ++ to gain performance. How does it work? I know with C ++ to set exactly the variables, but does the performance depend on the language, p...
asked by 04.02.2018 / 00:19
2
answers

detect char repeated in string c ++

Hello, I am trying to make a code to detect the occurrence of parentheses Na(CO5(Pt Let's assume something like that, I would have to detect the position of the two parentheses that are in the string. I tried to use string.find but it al...
asked by 14.12.2017 / 03:33
1
answer

Comparison for remove_if in c ++ does not accept char

Hello, I'm trying to use a    remove_if In c ++ however when it arrives at the input part I can not determine for it to detect if the string I'm pointing has a char. Here is my code: temp.erase(remove_if(temp.begin(), temp.end(), "("),...
asked by 14.12.2017 / 14:58
2
answers

Error: "can not convert 'int *' to 'int **"

I'm trying to send the address of an array to a created function (which has a pointer that is also an array). The error is as follows: main.cpp: In function 'int main()': main.cpp:30:28: error: cannot convert 'int*' to 'int**' for argument '1...
asked by 27.09.2017 / 22:25
1
answer

could not convert | Error while returning object

The purpose of the code below is to return the tokens of a given expression, for example: 50 + 30 * (30-10) + (10/2) . Where tokens would be: [number, 50], [sum, +], [number, 30], [mult, *], and so on. However, when you try to return the T...
asked by 21.09.2017 / 03:23