c++

Setting up Eclipse Juno

Please help me configure Eclipse Juno for C++. Full name: "Eclipse IDE for C/C++ Developers Version: Juno Release Build id: ... variables are registered in the OS: MinGW = c:\MinGW; PATH = C:\MinGW\bin; What do I need to do to compile the project?

Finding the maximum number in an array

Hello, I'm writing a function for finding the largest number in the array The algorithm: Declare the number 1 as a large nu ... } return max; } There are no errors, but it seems that the loop is just stupidly infinite though the variable count=8

Class constructor. I don't understand. C++

Good time of day! I study the book of Datelov, 5th edition. And now either the translator has gone too far, or I can't under ... f another SecondClass class (for example)? Why are they mentioned about them? What does this paragraph want me to do tell me?

Installing MinGW-w64-x86 64-gdb-8.3.1 on MSYS2

Installed the CLion IDE. I put the toolchain as a starter kit for the work. By default, the gdb-9.1- debugger is installed, a ... ly specified package gdb.exe from c:\msys64\usr\bin\ just doesn't perceive it. What am I doing wrong and what should I do? :)

How to combine four int variables into one?

int hours, min, sec, millisec; string str = "00:41:07,342"; sscanf(str.c_str(), "%02d:%02d:%02d,%3d", &hours ... s does not add up to each other, but goes sequentially. Using bit operations or other functions or something else to connect.

Speed up working with strings

There is an array (1-10 elements) consisting of long (up to 10,000 characters) immutable strings. There is also one (equally ... ealized that the program should run faster if I pass values to the function by reference (or pointer). Any other suggestions?

Remote debugging in Visual Studio

Good day, forum members! I describe the situation. There is an operating system Windows 8.1. It is running Visual Studio Ulti ... bugging. Please write detailed instructions on how to do this to do. Thank you very much in advance to everyone who responds.

Pyramid sorting in C++

Give an example of pyramid sorting (heap sorting) in C++.

Hash function, hash table

I can't make protection from entering an existing tab number. The function itself is prov. Here's how to use it correctly? I ... ////////////////////////////// void del (info g) { int i=hesh(g.tab); if (search) T[i].tab=NULL; }

Bidirectional list

Actually, I have a list, I set it this way struct Node //Структура являющаяся звеном списка { int x; //Значение ... Prev=NULL; //Предыдущий элемент указывает в пустоту Head=Tail=temp; //Голова=Хвост=тот элемент, что сейчас добавили } }

Binary search tree

Good day to all! Please help me to complete the program, namely, we need two methods: search and delete objects from the bina ... if (ivalue == head->GetValue()) { return true; } else { return false; } } };

Why does std:: pair have a custom assignment operator instead of using the default version?

Why does std::pair have a custom assignment operator instead of using the default version? The code from libc++ just does the ... copying constructor, for example, uses the default implementation, so it's not code style: pair(pair const&) = default;

Chess problem. The horse and I will walk together across the field

Problem condition: (conditions and testing system) Two chessboard cells are given. It is necessary to determine whether it i ... x1 - 1, y1 + 2, x2, y2) || h(x1 - 1, y1 - 2, x2, y2)) cout << 2; else cout << "NO"; } return 0; }

Singly linked list recursively

Creating a singly linked list with the addition of an element recursively. I figured out the input/output functions recursive ... cout << "(after) Элемент N: " << newinfo1 << " успешно добавлен.\n"; output1(d); }

c++ Removing duplicate array elements

I don't understand how to do this removal of duplicate elements, please help. It can be seen that I wrote some nonsense after ... rr[i + 1]) { delete[] arr; size--; } } } }

Dereferencing an array pointer

int array[3]{1,2,3}; int (*ptr)[3]=&array; When dereferencing std::cout<<*ptr; (или std::cout<<ptr[0]) по ... address of the next element. Or does the array break up in std::cout<<ptr[0];, but not in std::cout<<ptr[0]+1;?

How do I pass an array to a function?

You need the array to be an input parameter. void f (int &heap[]) { } The compiler swears at the code above.

C++, from a list of words of length 3 or 4, find words that are palindromic

The challenge: To develop the functions hash with the properties of h(a,b,c)= h(c,b,a) and h(a,b,c,d)= h(d,c,b,a). For a list ... e a search for the number of palindromes from the letters of the palindrome (which can also be meaningless, but palindromes.

cin.ignore; cin.clear; cin.fail

I found a code example using these functions, but I don't understand what they are for and how they work double getValue() ... ляем значения предыдущего ввода из входного буфера } else // если всё хорошо, то возвращаем a return a; } }

Singleton and implementation

If I create a class as a loner, do I need to implement an assignment operator, copy constructor, class comparison operators, ... I will ask how to implement Singleton if the class object will be created as Class * c = new Class(); And not so Class c;