Posts by Geraldo Luis da Silva Ribeiro • 221 points
5 posts
-
2
votes4
answers744
viewsA: How to get the highest and lowest number among 15 typed numbers? C++
You can enter the input data into a std::set, which is an ordered container, and then just take the first element (smaller) and the last element (larger). #include <iostream> #include…
-
1
votes1
answer664
viewsA: How to create one class inside the other in C++?
Just use class within the class. Note that the visibility applies the class variable equal to any other method. In the example below the class OperadorAritmetico is private. // Calculadora HPP class…
-
1
votes1
answer307
viewsA: What linux command is used to find out who is the parent of a process?
Use ps axf and see in tree form, so it is very easy to find the dependent processes. 15732 pts/1 Ss 0:00 \_ bash 26695 pts/1 S+ 0:00 | \_ make watch WATCHMAKE=dev -j64 --keep-going ... 26704 pts/1…
linuxanswered Geraldo Luis da Silva Ribeiro 221 -
3
votes1
answer169
viewsA: What’s the difference between a Windows compiler and Linux executable
This answer is simplistic, but it tries to give an idea. Imagine that programs are a list of requests to do something. Just like in a restaurant where Voce makes the order informing that either…
-
2
votes2
answers254
viewsA: Create files in the Home folder with C++
It depends on what you need to do. The environment variable HOME can be manipulated by the user allowing a false place to be specified. To get the real home you can use the function getpwuid. To get…