#ifndef WORLD_H_ #define WORLD_H_ using namespace std; class World{ public: friend class DoodleBug; friend class Ant; friend class Organism; i
I was writing an AVL tree implementation but got an error due to bad_alloc on another platform. However, the code works perfectly for me in CS50 IDE without any
I'm new to using CLion and when I try to debug I get an error saying Debugger executable not found: C:\Program Files\JetBrains\CLion 2021.3.3\bin\gdb\win\bin\gd
I am trying to turn a function, createArray, into a constexpr function. This function creates an array from a contiguous section in memory marked by two arbitra
I'm trying to understand dynamic type casting. How to properly implement the DrawAnimals and Talk To Animals functions using dynamic_cast? DrawAnimals draws ani
I'm trying to add a help/information box in my program that pops whenever someone type in a /h, /?, /help commands. I want to make sure that my program accepts
How do I obtain a function pointer for a class member function, and later call that member function with a specific object? I’d like to write: class Dog
I'm working on a string manipulation code in C++ for my assignment, where I have to find a substring within a string and essentially replace it with a newly com
I'm attempting to build a flat 32-bit PIC binary with the following C++ code: extern "C" { void print(const char *){} void entry_func() { print("abcd\n"); }
struct A { A(); A(int) = delete; operator int(); }; int main() { true ? A{} : 0; } Compile with C++20, Clang accepts it, but GCC and MSVC reject it w
I added my hal interface in manifest.xml, vendor_compatibilityMatrix.xml, and also in device.mk. And also I have created hal.rc file as well for my hal. but at
We have a jenkins server setup in AWS on an ubuntu machine. Created two machines on windows server 2012 and each having visual studio enterprise edition install
Sometimes the code runs till the end without any errors while other times it stops in the middle and gives me this error Thread 1: EXC_BAD_ACCESS (code=EXC_I386
Recently I became Lua expert in my team due to an issue occurring when we want to send a large table to the following function: int native_sl_shootlaserpulse(
I'm adding warnings (and treating them as errors) to my C++ project which uses CMake for builds. Initially I used target_compile_options. But as I've added more
fatal error: experimental/coroutine: No such file or directory this is the error the compiler gives me here's main.cpp #include <fstream> #include <io
I'm writing a Windows service that receives an encryption key from our web server. Such key never leaves memory and is used to encrypt and decrypt sensitive dat
I'm working on an IRC server using c++, and I want to add files transfer to my server, but I don't know how to create the file in the user's host. I can read th
I am interested in discussing methods for using stringstream to parse a line with multiple types. I would begin by looking at the following line: "2.832 1.3067
I am trying to compute the number of triangles for each edge in an OpenMP parallel code. Following is the code snippet where I am doing it. While running with m