Questions tagged as 'c++11'

1
answer

"void * reader (void * i)" What is the equivalent in C ++?

I'm studying Operating System and I have an exercise to do in C ++ and I'm having doubts (the book only comes in Java), I have to implement a classic reader and writer problem using traffic lights and control variables ... And I'm studying some...
asked by 08.12.2017 / 21:46
0
answers

Runtime Error URI1270

I made a code in C ++ to solve the 1270 Fiber Optic URI problem. I did several simulations and the code solves the problem but in the URI environment, the answer is "Runtime Error". Can someone help me figure out where the error is in the code?...
asked by 13.07.2017 / 05:09
1
answer

How to stop a for loop that stores strings values entered in C ++?

So I've tried everything I tried to compare type typed a "." or set a threshold value and even then the program does not continue, it stays within the infinite loop. The code comes next: vector<string> inserir(){ vector<string>...
asked by 20.01.2017 / 16:51
0
answers

Methods that return constant values in C and C ++ even if they come from variables, is it possible?

In a series of optimizations in a code written in C ++ I adopted a class to store data of parameterization of the application and some pseuconstantes let's say so. What actually happens is that when the application initializes it gets all par...
asked by 15.10.2016 / 11:29
1
answer

How to find something specific inside a text file

Hello, I have to check the grades of a particular student and if his average is greater than 5 show the name so I do not have the idea of how to do this ... nor to ask how he does it so sorry if I was not clear struct ALUNOS{ char nome[50];...
asked by 05.11.2015 / 17:09
1
answer

Program having unexpected exit

I'm having an unexpected exit problem and can not seem to find the error in my code, the output in question is the errors of all the sentences which are not "Dog walks.", a notorious observation is the fact that the user enter with "Dog" enter "...
asked by 29.03.2016 / 19:00
2
answers

Reactivate form when closing another

I have a main form and this way I click on a button and open another form , then when I open this other form I deactivate the main, until then everything well, then I wanted it when the user closed the second form , the main would resume wor...
asked by 05.11.2014 / 23:46
1
answer

How to test the runtime of a code in Visual Studio 2017?

I'm trying to test the runtime of a code, however I'm always getting incorrect values, the first test will always be the one that has the worst time. And most of the time the second test is always 0. #include <iostream> #include <math...
asked by 06.08.2018 / 20:01
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

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