c++

Implementation of the division function. C / C++.

Tell me the algorithm of the division function in C++ or C.

Implementation of the exponentiation function. C / C++

Tell me the best algorithm for implementing the exponentiation function (pow).

Windows x64 and x86 Registry

What is the difference between the registry in Windows x64 and Windows x86? I am registering a 32-bit component in Windows 7 x64. After registration, it is not possible to call it, and the registration is successful.

Arrays and inheritance in c++

I'm studying c++, I ran into a problem. There is an Animals class. It has two derived classes Cat and Dog. How to make an arr ... t;name = ""; } }; int main() { Animals anm[10]; anm[0]=Cat(); anm[1]=Dog(); std::cout<<anm[1].age; }

Cancel HttpSendRequest in WinInet

I omitted part of the code for readability, but the essence, I think, is clear. I call the page loading via WinInet, I hang t ... ); except On E: Exception do Result:= AnsiString('Ошибка! ' + E.ClassName + ': ' + E.Message); end; end; end.

How to connect the [muParser] library to Qt?

I will need to connect the muParser library (GitHub) to Qt Creator. The problem is that I don't fully understand how to do ... that on another device it can be compiled from the project without additional installations (well, that is, from Qt Creator).

IDE for C and C++

The answers to this question were written by the joint efforts of the community. To improve this message, edit the existing r ... choice of IDE, I suggest in this topic to analyze what IDEs exist for C and C++. What is the advantage of one over the other.

How to translate milliseconds into normal time for understanding

I write a small player using QMediaPlayer. There is a signal that is triggered every 1000 milliseconds. I'm wondering, is it ... time like 2:23 (2 minutes twenty-three seconds), or do I need to make 2 widgets; one for minutes and the second for seconds?

Array of classes in C++

Good day, dear experts. I just got on the warpath with my ignorance of C++, so please be lenient if the question is stupid. ... erly organize an array of classes. If it is possible a tiny example would be..) Thank you in advance for your good advice )

C++, OpenGL-Merging texture color with shape color

I wrote the texture code on OpenGL, when I show the texture separately, everything goes well, and when I draw another shape t ... ite.getPoint(3); glEnd(); glDisable(GL_BLEND); glDisable(GL_TEXTURE_2D); glPopMatrix(); How to fix it?

How to view values from std::vector in the Visual Studio 2019 debugger?

There is the simplest code: #include <iostream> #include <vector> int main() { std::vector<int> v {0, ... , and how do I make it display useful information to me, and not the details of the internal implementation of the container?

QT C++ Creating an ISO image

There was a task to create a simple program for creating ISO images from a CD in C++. However, in the wilds of the Internet, ... orking with disks libcdio But I didn't find any examples of creating images or sane descriptions. Tell me which way to dig?

Binary search, or rather return c++, does not work

I wrote a binary search algorithm, why does return work incorrectly? If you make a void function with the output of the respo ... ) { cin >> numbers[i]; } cin >> find; cout << binarySearch(find, numbers, 0, n - 1); }

Calculating the average, maximum, and minimum age in c++

I don't understand what the error is. Outputs: struct StatisticVisitors { public: string surename[255]; }; void Stat ... erageAge; cout << "\nold: " << maximumAge; cout << "\nyong: " << minimumAge << "\n"; }

Floyd's algorithm, distance matrix output

I implemented Floyd's algorithm, but I wondered how to make, in addition to the output of the shortest path matrix, also the ... kol; j++) { cout << mas[i][j] << " "; } cout << endl; } return 0;

You need to output N pairs of twin primes

I generally understand the question itself, but I can't understand how to implement it in C++. As I understand it: for(N=n; N ... ystem("pause"); return 0; } By the way, it is not working because I did not understand how to implement this or that...

Combine python (gui) and C++

I have a program that works with files, everything is ready except for the interface, I could easily finish it in C++, but th ... is running out. Is it possible to make an interface in Python, and functions in C++? Well, somehow from Python to call them?

C++vectors don't work

I'm working on a 2D game in SFMl c++. but I think it is not important. There is a World class. It has a string type vector ( ... the code, I specified a possible string due to which occurs error ATTENTION! the error is not the build, but the execution!

Displaying an array of structures on the screen as a table

Data storage must be organized as an array structures. The program must implement the following functions: Creating a new r ... can't display an array of structures on the screen as a table. I have already prescribed the functions, but it does not work.

Classes vs. Structures

Should I use structures in my C++ codes? I understand the structures are remnants of the C language. On the one hand, structures are easier to write and use than classes, but they undermine the principles of OOP.