Questions tagged as 'c++'

1
answer

How to show accented characters in Visual Studio 2017 using C ++?

Good afternoon, I asked this question a long time ago, but it was bad so I deleted it and I'm redoing it in more detail. My problem is this: When I use accent in Visual Studio it returns strange characters. This only happens when I compile...
asked by 15.10.2017 / 20:54
2
answers

C ++, Program does not solve all Instances!

Hello, good evening. I am in the first period of computer science, my university has a website of its own that evaluates your code and gives you a score from 0 to 100, but it happens that in this code I get 93.3, and the website says that the pr...
asked by 11.10.2017 / 23:50
1
answer

When I'm installing a class I need to perform a 'delete' after using the object even though the class has a destructor?

If I instantiate a class and render an object from it, I have to deallocate the memory of that object at the end of its use, right? But if the class that gave rise to my object has a destructor, will it be necessary to perform a delete on the ob...
asked by 10.09.2017 / 19:35
1
answer

C ++: Vectorunsigned char

I am doing a dynamic numeric class, storing the value of the number in a vector of bytes. I did the functions of addition, subtraction and multiplication in the same way that we learn in school, but this can not be applied in the division. What...
asked by 25.07.2017 / 22:42
1
answer

Validating file extensions with regex in c ++

#include <regex> #include <iostream> bool is_source_file(const std::string& source) { std::smatch source_match; const std::regex pattern("(?:(?:[a-zA-Z0-9_.])?(c|C|h|H|x|X|.?xx|.?XX|.?pp|.?PP|.?++|.?h|.?H|.?tm|...
asked by 22.07.2017 / 19:11
1
answer

Function per parameter does not modify variables

I built a binary tree class in which I have a bfs function that runs through it. As a parameter this method gets a void (*Op) (node_BT <type> *) function pointer that will be called inside the bfs itself: #pragma onc...
asked by 23.07.2017 / 06:58
1
answer

How to use cin.get () in C ++?

I would like to know more about the cin.get () function and also the difference between it and the getline () function because whenever I go to search something related to this I get more search results talking about getline () do than cin.get (...
asked by 06.08.2017 / 23:34
1
answer

http connection with c ++ and curl or any other library

I need to do url https and http request. I found several libraries, some easy, some not so much, but the only one I could install was the curl. I have already taken several examples, the problem is that in the examples they are using structured...
asked by 29.06.2017 / 03:29
1
answer

How to call a method within the class?

I'm trying to call the method that returns a unsigned char through another method of the same class, I've reviewed the entire internet but I did not understand how to do it. byte CryrazCore::*ComputeByteArray(byte inputData[], bool decr...
asked by 29.07.2017 / 06:43
1
answer

C ++: Instances of the same class

I have in a project a class Collision , and to make a more efficient detection, I wanted to have access to all instances (objects) of that same class. Is there any easy way to do this? Edit 1 I did so: I created a class called wor...
asked by 02.06.2017 / 10:49