menu

Recent questions tagged cpp

1 vote
1 answer
How do I find the sum of the numbers on the interval 1 to n(n is entered by the user), step 1? How do I find the sum of the numbers on a range from 1 to n(n is entered by the user) , step 1, through the loop? Enter for example 5, outputs 1 2 3 4 5 How do I ...
by whatislov
asked Sep 24, 2021
2 votes
2 answers
How to use C++ code together with C? main.cpp #include "hslocallib.h"int main(int argc, char argv) { const char inpath = argv; unsigned int length; readInputData(inpath, &length); r ...
by hauptling
asked Sep 24, 2021
1 vote
1 answer
How to properly organize the storage structure and version control of the project? Hello! I am engaged in optimizing development processes, as well as the implementation of CI/CD practices, using gitlab and its autobuild system, I have a project in d ...
1 vote
1 answer
How do I set the decimal in my code? How to make my code work with decimals, as soon as I set the a variable to a fractional number. The program immediately calculates wrong and terminates. Silly questions. ...
by guzya007
asked Sep 24, 2021
1 vote
1 answer
Can I use the same name to declare fields and methods of different classes? Is it possible to make fields with the same name but different values for different classes? (And also functions) As I have to write now...#include using namespace st ...
by KRASHMATE
asked Sep 24, 2021
1 vote
2 answers
AccessViolationException appears: "Attempting to read or write to protected memory". What could be the problem? Here is the code. If anything, I'm just learning the basics of Algorithmization and programming. I don't understand anything on distance learning. I have never done prog ...
by guzya007
asked Sep 24, 2021
1 vote
1 answer
image
Where is the error in the matrix sorting algorithm? The matrix should be sorted so that first come the negative, then the positive, and then the zeros, keeping the sequence, but my zeros come first for some reason for (i ...
by mpvcluuuuub
asked Sep 24, 2021
1 vote
2 answers
image
Is the problem solved correctly? Good day! I'm just starting to work on c++. There is a task: You need to write a console application to get the answer c . I wrote a function, the answer comes out ...
by Heckfy325
asked Sep 24, 2021
1 vote
1 answer
How do I write an object in a field and change it in the same class? I'm writing a snake, and I need to somehow change the matrix of the Field class object in the Snake class object. I pass Field object through constructor and write it in ...
by soiran
asked Sep 23, 2021
1 vote
2 answers
How to check the input data in C++? I have code that gets three int outputs from keyboard input. I need to print an error if the user entered a non-numeric value. The error needs to be specified. How is it ...
by ackeee
asked Sep 22, 2021
1 vote
2 answers
What would be the best way to write the code? #include <iostream>int main() { int a = 4668; int b = 10415; int c = 0; int minValue = 0; for(int i=a; i<b; i++) { if(i%3==0 || i%11==0) { ...
by Pbalordorbaor
asked Sep 22, 2021
1 vote
1 answer
image
What is the matrix sorting error? The task is to create an algorithm that will sort a matrix from a two-dimensional array as follows: first there are negative numbers, then zeros, and then positives. It ...
by mpvcluuuuub
asked Sep 22, 2021
1 vote
1 answer
Please explain at what point in the code I got a random number in the output? #include <iostream>int main() { int a = 4668; int b = 10415; int c; for(int i=a; i<b; i++) { if(i%3==0 || i%11==0) { if(i%2!=0 &am ...
by Pbalordorbaor
asked Sep 22, 2021
1 vote
1 answer
What is the meaning of the subsequence? For example, there is a sequence of pairs. This is understandable. But what does a subsequence mean? How is it implemented in C++? ...
by Shemapp
asked Sep 22, 2021
1 vote
2 answers
How do I remove a row from a matrix? You need to remove the row that contains the maximal element from a 67 matrix. Here is a snippet of code: #define m 7#define n 6#define k 6.....for (int i = 0; i < ...
by bunnyyy
asked Sep 22, 2021
1 vote
4 answers
How to transfer data from a network interface to a C++ application as fast as possible? The data is now streamed via ODBC to the database, and the application reads it from there. Surely this is not the fastest way to get data from the network interface to ...
by immelnikoff
asked Sep 22, 2021
0 votes
1 answer
Why does it give me this error? I do not understand the meaning of the error, please help. Here's all the code. All my code#pragma once namespace Project3 { using namespace System; using namespace ...
by FlakeSunrise
asked Sep 21, 2021
1 vote
1 answer
How can I run PsExec from a C++ application with a console window displayed? I make a program for myself (C++, RAD Studio), I am an administrator, not a programmer. I can't access a remote computer via psexec by pressing a button. This variant ...
by Karada
asked Sep 21, 2021
1 vote
1 answer
image
Why does nan ind pop up when decomposing a Fourier series? Started to learn pluses, this is the problem, decompose the function using Fourier series, accuracy 0.0001. The value of the function is found, but the row does not wor ...
by mpvcluuuuub
asked Sep 21, 2021
1 vote
2 answers
image
What is Convert's error? I don't understand the error, why the Convert function doesn't work. Error at the bottom, when converting a #pragma oncenamespace Project6 { using namespace System; u ...
by FlakeSunrise
asked Sep 21, 2021