Questions tagged [c++]

C++ is a general-purpose programming language. It was originally designed as an extension to C and has a similar syntax, but it is now a completely different language. Use this tag for questions about code (to be) compiled with a C++ compiler. Use a version-specific tag for questions related to a specific standard revision [C++11], [C++14], [C++17], [C++20] or [C++23], etc.

Filter by
Sorted by
Tagged with
-1
votes
0answers
9 views

Function to separate each word from a string and put them into a vector, without using auto keyword?

I'm really stuck here. So I can't edit the main function, and inside it there is a function call with the only parameter being the string. How can I make this function put each word from the string ...
0
votes
0answers
3 views

My program keeps crashing. My compiler doesn't give any error, message or anything else

I am working on a program. I tested it (no errors, worked perfectly), went on a break, and when I returned I was greeted with weird errors. When I fixed them, the program started crashing immediately ...
0
votes
0answers
7 views

QProcess how to request windows UAC to bypass password using runAs for admin level commands from an admin account

Question: Can anyone explain to me how to call UAC? At this point, I need to elevate a Powershell session. All of the other methods I've used in the past or see here require a password. I need to ...
0
votes
0answers
18 views

Link error in Visual Studio Code with C++

I installed Visual Studio Code on Mac with Catalina in order to learn C++. Installed extensions C/C++, C/C++ Extension Pack, C++ Intellisense, CMake Tools and Code Runner. To test VSCode I tried ...
0
votes
1answer
38 views

how to use += operator to add characters to a linked list?

I have this Char.h file: struct Node { char value; Node* next; }; class CharList { private: Node* head_; //point to the first Node of the list Node* tail_; //point to the last Node ...
1
vote
2answers
21 views

no matching function for call to Structured_Matrix::Structured_Matrix()

I am a student needing help with an error on my assignment, we are currently learning about inheritance and polymorphism. Symmetric_Matrix is a derived class of Structured_Matrix Symmetric.cc, this is ...
0
votes
0answers
17 views

main': CheckSymbolExists.c:(.text+0x1b): undefined reference to pthread_create

I am building Faunus software using cmake with command --> $cmake . -DENABLE_OPENMP=ON -DENABLE_PYTHON=ON -DCMAKE_INSTALL_PREFIX:PATH=/home/user/localInstall/tstFaunusInstOpenMP -DPYTHON_EXECUTABLE=...
0
votes
1answer
34 views

C++ detached thread: terminate called without an active exception

I'm creating a thread pool system in C++ and I'm getting a weird exception when destroying all of my threads. This is what's happening: terminate called without an active exception This is the code ...
1
vote
3answers
46 views

How can I get multiple numbers from a user and add even numbers together and multiply odd numbers?

I want to write a program that takes 5 inputs and adds even numbers and multiplies odd numbers, but I do not know how to do this after I know which number is odd and which is even. #include<...
0
votes
0answers
18 views

How do I fix this undefined reference error? [duplicate]

I have code from github for a LIDAR sensor to be run using a Raspberry Pi. When I try to compile the code I get an undefined reference error. This is my first c++ project so I do not know anything ...
-1
votes
0answers
26 views

Error C2664: cannot convert argument n from 'type1' to 'type2' [closed]

The main code: #include "ProgramCounter.h" unsigned int currentInstruct; std::vector<unsigned int> instructionMemory; ProgramCounter PC; void fetch(std::vector<int> inputInstruct)...
1
vote
1answer
44 views

Template Specialization Based Upon is_pointer Trait

I am sure this has been answered before however, I am not sure what the correct terminology/wording of my question is. Take the following example class: class Fooable { public: int foo(int a); }; ...
-3
votes
0answers
53 views

can someone debug my code. i would be greatful [closed]

https://www.hackerrank.com/challenges/variable-sized-arrays/problem my code passes 2 cases but I get segmentation fault on rest cases.what is the issue. i am a newbie coder so pls rather than roasting ...
0
votes
0answers
16 views

Trying to print out the elements in the last level of a min heap

I'm trying to print the last level in a min heap. I thought I had code that works, but one of the test cases fail. In terms of the test cases, I only have access to how the output does not match. Here ...
-2
votes
0answers
32 views

binary ==: no operator found which takes a right-hand operand of type const_Ty

This is the current error I get in VS, code C2679. I have isolated it to the code below. code: auto nx = find(stations.begin(), stations.end(), [n] (Workstation* w) -> bool {return w->...

15 30 50 per page
1
2 3 4 5
47979
 
久草视频新免费_日韩视频一中文字暮_欧美三级片