Posts by silash35 • 483 points
23 posts
-
0
votes1
answer44
viewsQ: How do I keep copies of files in a Git repository?
I maintain this repository https://github.com/silash35/qpdftools-packages that contains binary files from another repository. It was created to maintain the files needed to build packages. Currently…
-
0
votes1
answer50
viewsA: How to know the last element in a Qlistwidget?
I solved the problem using the method count() which returns the number of elements in the Qlistwidget. So I keep the number of elements, and having the number of elements I have the Row of the last…
-
1
votes1
answer50
viewsQ: How to know the last element in a Qlistwidget?
I have a Qlistwidget called list_toMerge with some items added, then I created 2 buttons to change the order of the items. The up button and the down button. First look at the code in the up button:…
-
2
votes1
answer163
viewsQ: How to use Emscripten?
I wanted to convert my codes into C++ for Javascript so I could use them on web pages. How can I do this? From what I’ve researched Emscripten does that, I just don’t know how to use it. How it…
-
1
votes1
answer55
viewsQ: How to use a Robots.txt on Github pages
I have a repository on Github and it has a site that’s visible on github pages, only I want the search sites to just show you the homepage of the site. If it was a regular site I could add a…
-
1
votes1
answer272
viewsQ: How to start an array with the value the user type is possible?
If all allocated memory is defined at the time of compilation, then how is this possible: int num{0}; cin >> num; int array[num]; From what I understand, this could only be possible if using…
-
1
votes1
answer69
viewsQ: Declare array in class not knowing it will be its size
How to declare an array within a class, even if you don’t know what size it will be and leave it accessible throughout the program. Note this class: class exemplo{ public: int tx{0}; int ty{0}; int…
-
2
votes1
answer208
viewsQ: How to declare a multidimensional array using new
How do I declare a multidimensional array using new ? A normal array would look like this: int* ponteiro = new int[5]; But int* ponteiro = new int[5][5]; does not compile ! but int array[5][5];…
-
1
votes2
answers217
views -
1
votes1
answer69
viewsA: Add method to an existing c++ class
It is not possible to do this without changing the class code, you need to put at least the function name in the class. You could solve your example like this: class original { public: void…
-
2
votes1
answer186
viewsQ: Do irreversible operations exist?
In mathematics (therefore in programming) there are mathematical operations (+,-,*,/). But all the mathematical operations I know are perfectly reversible, for example, by dividing a number, I could…
-
0
votes2
answers774
viewsQ: How to randomize an Array in c++
There is a lot of material here about arrays ordering methods (quicksort, bubblesort, etc.) but I wanted to know if there is a "clutter" method of arrays, i.e., shuffling the elements of an array.…
-
4
votes1
answer220
views -
2
votes1
answer92
viewsQ: Arrow keys on QT
When we want to use Keyboard arrows in C++ we use the Ncurses or conio. h libraries, depending on the operating system. But there is a way to do this using the QT libraries ?
-
0
votes3
answers542
viewsA: Bluetooth communication between android and Arduino for interaction with grbl
To make the communication between Arduino’s bluetooth and Android, you will need a bluetooth module on your Arduino, recommend the HC-06. The connection between the Arduino and is simple HC-06, All…
-
1
votes0
answers36
viewsQ: Is there any cross-platform way to use keyboard arrows in c++?
In windows has the library conio.h. if I am not mistaken it is possible to use the arrow keys on the keyboard on Linux using ncurses. h, but I wanted a more cross-platform solution where the same…
-
-3
votes3
answers1443
viewsA: C++ - How to create a window in windows
I recommend researching about QT, which is a cross-platform framework for developing C++ graphical interfaces. With it you can make programs that work on both Windows and Linux and Macos. If you…
-
0
votes1
answer57
viewsA: How to get Thread Stack?
Take a look at the code of the hacker process that’s on github : https://github.com/processhacker/processhacker There’s the file called thread. c with quite complex content as it interacts with the…
-
0
votes2
answers254
viewsQ: Create files in the Home folder with C++
In c++, creating files is very simple, just include the fstream library and use ofstream arquivo; open file("variables.txt"); But this generates the file in the project folder and I would like to…
-
4
votes1
answer169
viewsQ: What’s the difference between a Windows compiler and Linux executable
When compiling a simple program for Linux, the compiler generates an executable that only works on Linux, but when compiling the same code with a compiler for Windows it generates an executable that…
-
0
votes1
answer43
viewsA: Visual studio runtimelibrary error
Your question was not very clear, where and when this error appears ? But usually this type of defect is solved with a Reinstallation. Try to uninstall the program, delete all remaining folders…
-
4
votes2
answers501
viewsQ: When to dynamically allocate memory?
In C++ you can easily declare an object or variable like this: tipo_da_variável nome_da_variável; This type of statement is the easiest to use, but you can also use the new to dynamically allocate…
-
2
votes0
answers433
viewsQ: What is the difference between . h and . hpp and when to use (C++)
Files . h are used in C/C++ as header files where all their contents are automatically passed to another file. cpp and your choice using the command: #include <arquivo.h> But recently I saw a…