Is there any practical difference between std::array<const T, N> and const std::array<T, N>? It looks that non-const array holding const elements is still not able to be swapped, assignment operator is not working either. When should I prefer one over another? #include <array> std::array<const int, 5> cc_arr5 = {1,2,3,4,5}; std::array<const int, 5> cc_arr5_2 = {1,2,3,4,5}; ..

Read more

I’m doing an assignment which command me to count the numbers of future numbers in q elements given. A future number is a number which has all the divisors of it (1 and itself are not include) that are prime numbers. It doesn’t print anything at all. Anyone have a suggestion why isn’t it working ..

Read more

Apologies in advance if this turns out to be a stupid question… I have picked up a very old piece of c++ code that references MemReAlloc. Does this function exist in current visual-studio/windows and if so how do I get access to it, or has it been replaced by new memory management functions? I suspect ..

Read more

i am trying to use boost to expose a c++ class to python, but i cannot figure out the linking error i am getting. My demo program looks like this: #include <boost/python.hpp> #include <Python.h> char const* greet() { return "hello, world"; } BOOST_PYTHON_MODULE(hello_ext) { using namespace boost::python; def("greet", greet); } and my meson file looks ..

Read more

I’m trying to convert my unreal blueprint to c++ and when I try to convert this node it doesn’t work when I use this: void Agrapplecomponent::m_set_world_location(const FVector& new_location) { m_cable->SetWorldLocation(new_location,sweep,outsweephitresult,teleport); } the error ‘FHitresult cannot be converted to FHitresult*’ however when I change the variable to FHitresult* UPROPERTY(EditAnywhere, BlueprintReadWrite) FHitResult* outsweephitresult; I get the error ..

Read more

Maybe I need to install netty? I have installed ES 7.16.3 Then installed Zulu 17 openjdk version "17.0.2" 2022-01-18 LTS OpenJDK Runtime Environment Zulu17.32+13-CA (build 17.0.2+8-LTS) OpenJDK 64-Bit Server VM Zulu17.32+13-CA (build 17.0.2+8-LTS, mixed mode, sharing) I added set ES_JAVA_HOME=C:Program FilesZuluzulu-17 to the elasticsearch.bat but get this: [2022-01-21T14:39:51,856][INFO ][o.e.n.Node ] [<machine name>] version[7.16.3], pid[18928], build[default/zip/4e6e4eab2297e949ec994e688dad46290d018022/2022-01-06T23:43:02.825887787Z], ..

Read more

terraform CLI is very slow on windows for me. I have created batch script below to time it: echo %time% terraform echo %time% where the output is following: I don’t think simply calling terraform without any arguments should take 32 seconds. Does anyone here have the same issues? I have run terraform init without a ..

Read more