Anonymous
how do i get dlopen(NULL, RTLD_LAZY); to work, as dlsym(symbol_table, name); returns 0x0 even though the symbol exists
i am using android ndk
Anonymous
even this fails dlsym(dlopen(NULL, RTLD_LAZY), name); and dlerror reports undefined symbol: newInstance__imgui even though i use extern "C" attribute ((visibility("default")))
Anonymous
i have 5200: 000000000020dd00 152 FUNC GLOBAL DEFAULT 14 newInstance__imgui
Anonymous
Anonymous
Sir i have a doubt
Anonymous
Write a program to generate even number between given range
Captain
Anonymous
I didnt write this program
Anonymous
Please complete my program
Captain
Try it,
We are not here to write your programs.
We will help you when you get stuck at certain point.
ꍏꈤꀸ
Have anybody ever wrote own .mdb files reader/writer?
ELAF🌻
Hello
I, m elaf
I study IT
I wanaa some channels in YouTube to learn c++ language plz help me I have exam with in week
ꍏꈤꀸ
ꍏꈤꀸ
Anonymous
Anonymous
The best way to pick up C++ is via a book because the language has a lot of quirks you need to know
Manu
Luca
#include <stdio.h>
int main()
{
char a;
int r;
do
{
printf("Enter a number:");
scanf("%d",&r);
printf("Do u need to do again(y/n)?");
scanf("%c",&a);
}while (a=='y');
}
For some reason this do not do what i need to do. Then u might be asked me that what i need to do. I believe u can understand what i need to do.
However, if anyone hear to tell me what wrong with here, pls tell me quickly. Because it chop my brain.
Anonymous
Luca
Luca
-
Can i ask question bcs i dont understand this sbjct😢
Anonymous
Can anyone send the best link to learn about lists in c++
Anonymous
Sandeep
Is the any difference if I pass the size of an array to a function vs when I calculate the size of the array inside the function
Anonymous
Sandeep
Anonymous
Built in means created in main??
Built in array means array created like this "int arr[10]" though technically there is nothing like built in array in the standard. It applies more to languages like GoLang
Sandeep
Mr
#include <bits/stdc++.h>
using namespace std;
// } Driver Code En
vector<int> duplicates(int arr[], int n) {
// code here
vector<int> p;
vector<int> q;
map<int,int> m;
for(int i = 0;i<n;i++){
m[arr[i]]++;
}
bool dup = 0;
for(auto i : m){
if(i.second > 1){
p.push_back(i.first);
dup = 1;}
}
if(dup == 1)
return p;
else
q.push_back(-1);
return q;
}
// { Driver Code Starts.
int main() {
int t;
cin >> t;
while (t-- > 0) {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) cin >> a[i];
vector<int> ans = duplicates(a, n);
for (int i : ans)
cout << i << ' ';
// cout << endl;
}
return 0;
}
// } Driver Code Ends
Mr
why it showing tle my time comple. is O(n) ??
Anonymous
Write c program to find our stange pair numbers in between 1 to 200 which squares are mirror images of each other
Ex.13 and 31 is a mirror image of each othet and their squares 169 and 961 are also a mirror image of each other
Anonymous
Can someone plzz provide me a solution
Anshul
ꍏꈤꀸ
Kishan
has anyone solved XORequal problem at codechef, got to clear something
Anonymous
hi
Avinash
I need to Implement my own version my_queue, it should have exactly the same signature and functions as that of Queue class in STL. For this first, i need to declare a 'C++ Interface' that defines the interface for Queue class, then define a my_queue class that implements this Interface.
Can anyone help how to proceed about it ?
Kishan
in for loop of i, how can I access the count of any number in a map?
Vikas
Kishan
yes, like lets say we enter 4 times 1, 3 times 2 and 6 times 3 so in a for loop I want to access the count of these numbers(1, 2, 3)
Vikas
Vikas
like
arr = [1, 1, 1, 2, 2, 2, 2]
map = {1:3, 2:4}
Kishan
yes and now I want to print 3 and 4 using for loop
Vikas
Ok
Kishan
I tried this:
umap[i].second
didn't worked
Vikas
Kishan
okay
Kishan
though we can access them like this:
for(auto pr:umap)
{
cout<<pr.first<<" "<<pr.second<<endl;
}
but I need access them using for loop of i
Vikas
Kishan
let me try
Vikas
Vikas
As per of my knowledge, you can't access map's key value using index.
ELAF🌻
ELAF🌻
Thx
Anonymous
I can 👍💛
You might be able to learn the syntax within 1/2 weeks but not the language
Anonymous
C/C++ have the best syntax it’s easy and concise
Anonymous
The best way to learn is via a book because they cover it in depth
Anonymous
Kishan
umap[i] IS the value, it's not a pair
so anyhow can we access the key part using for loop?
and if do something like that
for(auto pr:umap)
{
cout<<pr.first<<" "<<pr.second<<endl;
}
we can access them as pairs!!!!
Anonymous
Kishan
here by key, I mean the number of occurrence of any particular integer
Kishan
i is the key
like if 1 goes 5 times and 2 goes 3 times then total iterations =8 but key for 1 is 5 and key for 2 is 3
Anonymous
Manav
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
void repalcex(char c[], char a, char b, int i = 0){
if(c[i] == '\0'){
return ;
}
if(c[i] == a){
c[i] = b;
}
repalcex(c, a, b, i+1);
}
int main(){
char ch[] = "hexxo";
repalcex(ch, 'x', 'l');
for(int i = 0; i != '\0'; i++){
cout<<ch[i];
}
}
Manav
Anonymous
'\0' is just 0
Official hooligan of Pius XII
Hi, what's the best way to embed python module or at least some code into c++ code? Unfortunately the python codebase is simply too big and rewriting it would be an overkill.
Anonymous
Manav
Anonymous
Anonymous
Manav
To print string
Anonymous
But you can make them interact with each other probably
Anonymous
you are basically writing
for (int i = 0; i != 0; ++i)
Anonymous
But they can’t be in the same .py file