Questions tagged as 'c++'

0
answers

How to install and configure the Boost C ++ library in Windows?

For some time I've been hard at work to learn C and C ++, I think I know enough to write a slightly more complex application using Sockets and Threads . Researching a little bit, I discovered the Boost C ++ Libraries framework, and no ma...
asked by 26.10.2017 / 18:41
1
answer

How to use Template in C ++?

I'm learning a bit about template and I made an example, but when I applied to my project I could not, let's go to the following test: #include <iostream> using namespace std; template <class Type> class p{ public: Type setVa...
asked by 10.04.2015 / 14:42
3
answers

OpenCV haartraining - Out of memory

I have 30 positive images and 60 negative images. When I tried to run haartraining with 4GB of memory and Quadcore processor, I get this error message: OpenCV ERROR: Insufficient memory (Out of memory) in function cvAlloc, cxalloc.cpp(111) T...
asked by 20.11.2014 / 12:39
2
answers

C ++ - Size of an array pointer

I have an array: char *exemplo[] = {"item1", "item2", "item3"}; And a function: void myFunc(**myArray) { } So, I want a function that returns the size of this array that I passed as a parameter. For example if I pass the array exem...
asked by 16.05.2014 / 21:18
1
answer

When to use void * and auto *?

C ++ 11 made us type auto ( automatic ). It can transfer type for the first time. But before him, people used to use void* , which you used to refer to on the pointer. Even today I use void* (Win32), but I also use auto...
asked by 14.02.2014 / 08:15
3
answers

How to generate large random numbers in C ++?

I'm trying to make a random number generator of [0,4], including these, but the problem is my teacher indicated that I used 4 million to generate random numbers and that value exceeds% with% / strong>, then there are two questions: How to g...
asked by 16.08.2017 / 19:00
1
answer

Is the C # language recommended to be distributed online with a database?

It is very easy to get the entire code from a C # program using .NET Reflector. Would it be possible for me to put the same security in a C # program as a program made in C ++? I found this answer in Stack Overflow in English but even in...
asked by 01.02.2016 / 17:33
2
answers

Does passing objects in Java simulate passage by reference?

Everyone says that Java goes by value, including Objects. These are passed by copy and can not be reassigned to a new object within the method. The problem is that it is possible to change the value of objects within the method. Does not this ch...
asked by 21.04.2015 / 15:52
3
answers

Utility of #pragma

Several C / C ++ codes have the word pragma . Depending on the way it is implemented it has a different function. #pragma once #pragma pack () #pragma comment (xx, "")    For what purpose has pragma been made?       W...
asked by 28.09.2016 / 21:58
2
answers

Josephus problem (recursive)

This is the recursively rendered resolution of the Josephus problem , where n is equal to the number of people in the circle, and k is the step number to be given to the next person. #include <iostream> using namespace st...
asked by 19.03.2015 / 16:52