Vlad
Rdp on android? Wut?
Anonymous
Yeah !
z
Who would run android on desktop, BTW.
z
Android x86?
Anonymous
z
Yes
I don't know the workaround. But what exactly do you need from controlling Android Desktop? Maybe if you tell the story, there is a workaround for you.
Anonymous
I don't know the workaround. But what exactly do you need from controlling Android Desktop? Maybe if you tell the story, there is a workaround for you.
Simple i just want to take use of pc by using my Android device anywhere in the world with a single IP address of computer .. Example AWS provides A desktop, adfly etc
Diego
Static member in C++
An instance member is a member of a class that is different for each object and belongs to it and it alone. A static member, on the other hand, is a member of a class that is global and common to all objects. There's one and only one copy of it that is shared between all objects `C++ foo{ public: int bar; static int bee; foo(int b){bar = b} } int main(){ foo a(9); foo b(5); //instance members cout << a.bar; // 9 cout << b.bar; // 5 a.bar = 13; cout << a.bar; //13 cout << b.bar; //5 foo::bee = 68; // Static member }
Anonymous
What OS does your PC use?
Windows or kalilinux
z
Windows has built in, I think. As long as you purchase the OS license, the RDP is free (I think I once used it).
z
For Kali Linux, XRDP is the choice.
Vipin
Anyone know about gadawdha OS
Anonymous
Windows has built in, I think. As long as you purchase the OS license, the RDP is free (I think I once used it).
I think you haven't understood what i'm actually taking about ! Here Rdp is remote control desktop which is inbuilt in every computer . If you see some companies like Amazon ,Microsoft and Google provides a virtual computer with Any OS you want. In order to use it we need to pay some amount. But using some tricks we can them for less price or completely free !!
Anonymous
its completely Legal
Vlad
its completely Legal
Still doesn't make it non offtop
Jabibi… Sonido Suave 🇩🇴🇨🇦
Does anyone have any a book called, “In The Heart of An Orphan” By Delton Sylvain. If someone has it please share with me. Thank you.
z
Yeah, it is offtop. Unless you ask how to compile XRDP, maybe a bit relevant, but still offtop.
Jabibi… Sonido Suave 🇩🇴🇨🇦
I’m not sure.
Jabibi… Sonido Suave 🇩🇴🇨🇦
I just need the book.
z
Not even programming.
Jabibi… Sonido Suave 🇩🇴🇨🇦
I’m sorry. I’m leaving.
AHMED
#include <iostream> #include <unordered_set> using namespace std; int main() { unordered_set<int> temp = {12, 23, 0, -4, 45, 34}; cout << "The original elements are:\n"; for (auto el : temp) { cout << el << "\n"; } cout << "Elements after adding a single value:\n"; temp.insert(66); for (auto el : temp) { cout << el << "\n"; } cout << "Elements after adding multiple values:\n"; temp.insert({16, 14, -25}); for (auto el : temp) { cout << el << "\n"; } cout << "Elements after deleting a single value:\n"; temp.erase(12); for (auto el : temp) { cout << el << "\n"; } return 0; }
AHMED
In the above snippet, How and where to write a function to call to replace the repeated range-based for loop?
AHMED
2) Is there a function to call in the unordered_set to delete multiple values?
Pavel
In the above snippet, How and where to write a function to call to replace the repeated range-based for loop?
How? As any other function. Make a void function that takes one argument - constant reference to set. Where? Outside of main function (again, as any other function)
ricoh
Are you going to work in Google or Apple ?
..none yet, if only i could get the opportunity 😂😂
Aakash
2) Is there a function to call in the unordered_set to delete multiple values?
https://en.cppreference.com/w/cpp/container/unordered_set Read parameters to individual “Modifier”.. 🙃
AHMED
How? As any other function. Make a void function that takes one argument - constant reference to set. Where? Outside of main function (again, as any other function)
#include <iostream> #include <unordered_set> using namespace std; class myclass { public: void myfunc(unordered_set temp) { for (int el : temp) { cout << el << "\n"; } } }; int main() { unordered_set<int> temp = {12, 23, 0, -4, 45, 34}; myclass myobj; cout << "The original elements are:\n"; myobj.myfunc(temp); cout << "Elements after adding a single value:\n"; temp.insert(66); for (auto el : temp) { cout << el << "\n"; } cout << "Elements after adding multiple values:\n"; temp.insert({16, 14, -25}); for (auto el : temp) { cout << el << "\n"; } cout << "Elements after deleting a single value:\n"; temp.erase(12); for (auto el : temp) { cout << el << "\n"; } return 0; }
AHMED
The above code has the following output:
AHMED
<stdin>:7:14: error: use of class template 'unordered_set' requires template arguments; argument deduction not allowed in function prototype void myfunc(unordered_set temp) ^~~~~~~~~~~~~ /data/user/0/ru.iiec.cxxdroid/files/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/unordered_set:336:28: note: template is declared here class _LIBCPP_TEMPLATE_VIS unordered_set ^ 1 error generated.
AHMED
How to solve this?
Nameful
Int
unordered_set<int> then
AHMED
unordered_set<int> then
Yes. I got it.thanks.
AHMED
#include <iostream> #include <unordered_set> using namespace std; void myfunc(unordered_set<int> temp) { for (int el : temp) { cout << el << "\n"; } } int main() { unordered_set<int> temp = {12, 23, 0, -4, 45, 34}; cout << "The original elements are:\n"; myfunc(temp); cout << "Elements after adding a single value:\n"; temp.insert(66); myfunc(temp); cout << "Elements after adding multiple values:\n"; temp.insert({16, 14, -25}); myfunc(temp); cout << "Elements after deleting a single value:\n"; temp.erase(12); myfunc(temp); return 0; }
AHMED
#include <iostream> #include <unordered_set> using namespace std; void display(unordered_set<int> ex) { for (int el : ex) { cout << el << "\n"; } } int main() { unordered_set<int> s = { 45, 78, 67, 23, 98, }; cout << "The original id list is: \n"; display(s); int x, y, z; cout << "Enter id to delete:\n"; cin >> x; cin >> y; cin >> z; for (auto el = s.begin(); el != s.end();) { if (*el == x || *el == y || *el == z) el = s.erase(el); else ++el; } cout << "The new id list is:\n"; display(s); return 0; }
SaM
Find Any Software, Any Course through this programmed Search Engine enhanced by Google and sorted by Date. https://cse.google.com/cse?cx=bdd7afd7c0371426b Have fun! Created by ➡️ @ies10 More updates are coming ♻️ Share 🔥 @tn_world
Vlad
Also why typedef instead of using?
Aakash
Also why typedef instead of using?
Yes😄 there are many way to life..
Vlad
You know, const refs are a thing
AHMED
😄😄
So , what is typedef? Is it more efficient?
Gustavo
https://pastebin.com/mEp81huM Hello everyone! My code here is working fine, but when I use cpplint to fix the code style, I get the following warning: 4 - Is this a non-const reference? If so, make const or use a pointer. [runtime/references] [2]
Gustavo
When i try to use pointers, it needs more memory, the point of using reference as parameter there was to use less memory
Igor🇺🇦
Where is my mistake, Vlad?
https://www.learncpp.com/cpp-tutorial/passing-arguments-by-reference/
Gustavo
btw is it really bad practice to pass a non-const reference as parameter?
Vlad
btw is it really bad practice to pass a non-const reference as parameter?
If it's small in size(up to 16 bytes) pass by value
Igor🇺🇦
When i try to use pointers, it needs more memory, the point of using reference as parameter there was to use less memory
That's wrong. reference is just a syntax sugar to pointers. When you pass reference it saves you from writing *, & , -> etc. They consume the same amount of memory
Anonymous
Is this a chat of false premature optimizations?
Igor🇺🇦
btw is it really bad practice to pass a non-const reference as parameter?
why would you pass reference by non const? What are you trying to do in binary_search ? Why does it change your vector?
Gustavo
I just started learning c++, sorry if I dont understand it 😕
Gustavo
why would you pass reference by non const? What are you trying to do in binary_search ? Why does it change your vector?
I want to find the index of a value if it was in the ordered vector. So i just add it as a new element and find the index with binary search
Gustavo
The problem is, I still don't know how to deal very well with pointers
Gustavo
The code is working, I just wanted to do it with pointers, and not with the reference
Igor🇺🇦
I want to find the index of a value if it was in the ordered vector. So i just add it as a new element and find the index with binary search
Method that does search shouldn't change your container. Don't change it and use const reference.
Igor🇺🇦
The code is working, I just wanted to do it with pointers, and not with the reference
If you, for some unknown reason, want to do it with pointers just replace & with * and instead of using vec[left] use (*vec) [left] or vec->[left] or *(vec+left) Using reference is preferable obviously from the syntax.