Khadija
I didn’t know how to analyze the time complexity here : For(I=1 ; i <=n; I++) For(j=1;j<=n;j++) {p=false ; k=1; While((!P && k<=j) If(A[i][j][k] == x) p=true; else k++; } The first loop of course O(n) But I didn’t know how to finish the rest … Can someone help me ? Thank you so much ✨
ALTER EGO
How ? I wrote it as I found it😢
Copy code and goto codebeautify.org/cpp-formatter-beautifier to format. On telegram RMB -> Edit -> Paste code -> Select code -> CTRL+SHIFT+M -> Send
klimi
How ? I wrote it as I found it😢
How? well just manually indent put it in monospace with ```, the classic stuff
Daniel
Hi, im newbie in c++ and i have to do an assignment i've been 3 hours struggling. The assignment is to show a name list with a unidemsional array of 10 positions with all the positions empties, find where are the empties positions (.find) to replace, them ask the user for a name name. The user will give the names until all the array[10] is full (while). It will be great if someone can help me fix my code.
ㅤㅤㅤ
I tried GFG Add two numbers represented by two arrays but getting error can anybody point it out https://practice.geeksforgeeks.org/problems/add-two-numbers-represented-by-two-arrays2408/1 class Solution{ public: string calc_Sum(int *a,int n,int *b,int m){ // Complete the function int num1=0,num2=0,sum; for(int i=0;i<n;i++){ num1 = num1*10+a[i]; } for(int i=0;i<m;i++){ num2 = num2*10+b[i]; } sum = num1+num2; return sum; } };
Anonymous
Convert both the array of numbers to string, convert to it to int and add...
Either read the question completely and then reply or don't reply at all.
Anonymous
Anybody good at data structure and algorithm(DSA)?
klimi
Anybody good at data structure and algorithm(DSA)?
don't ask meta questions, thanks
Subhajit
Any one have object oriented programming book 6th edition by E balagurusamy?
Edward
int* ammo = (int*)getPointerAddress(moduleBase + FullAmmoAddr, { 0x28, 0x224, 0x0 }); float* subAmmo = (float*)getPointerAddress(moduleBase + FullAmmoAddr, { 0x108, 0x44, 0x10 }); float FullAmmo = ammo + subAmmo; error code C2110 '+' : cannot add two pointers I've searched the internet and couldn't find any examples other than the string data type an example on the internet is just a string, then how do you add up the values of the *ammo and *subammo pointers?
labyrinth
how to know if a unique_ptr is holding a pointer that is not freed? it could potentially be called with ::get and deleted somewhere else.
Anonymous
how to know if a unique_ptr is holding a pointer that is not freed? it could potentially be called with ::get and deleted somewhere else.
That is Undefined Behavior. You shouldn't do it. The moment your unique_ptr's destructor runs, your code will run into UB territory. So if you are worried that a unique_ptr may hold an already deleted pointer, then you should worry more about teaching the concerned developer about C++ and worry about your code later.
Anurag
vector<int> leaders(int a[], int n){ vector<int> ans; if(n == 1){ ans.push_back(a[0]); return ans; } else{ ans.push_back(a[0]); } int indx = 0; int j = 1; while(indx < n-1){ for(int i = (indx + 1); i < n; i++){ if(a[i] > ans[j - 1]){ ans.pop_back(); ans.push_back(a[i]); indx = i; } } ans.push_back(a[indx + 1]); j++; } return ans; }
mj12
can anyone tell me why am I geeting "Abort signal from abort(3) (SIGABRT)" error for this code, and how can I resolve it?
Something's probably throwing an exception, attach gdb or any other debugger and have a look
Anonymous
can anyone tell me why am I geeting "Abort signal from abort(3) (SIGABRT)" error for this code, and how can I resolve it?
you're indexing the default initialized vector. You should rather declare the vector with the size of the array and initialized all values to the default before using index operation
Void
I wonder how to move all characters one place forward?
code
I can help CP(codeforces, codechef, ...) contest and some assignments. Please contact me.
Void
The second char
Void
Like , abcde → bcde
Void
It's actually more complicated😭
code
I can help CP(codeforces, codechef, ...) contest and some assignments. Please contact me. I am a Grand Master of Codeforces.
Anonymous
I wonder how to move all characters one place forward?
In C I know you could: #include <stdio.h> int main(void) { char arr[13] = "Hello World"; printf("String before: %s\n", arr); arr[12] = '\0'; for (int i = 12; i > 0; i--) { arr[i] = arr[i - 1]; } printf("String after: %s\n", arr); return 0; } but can also use memmove which is probably better: #include <stdio.h> #include <string.h> int main(void) {   char arr[13] = "Hello World";     printf("String before: %s\n", arr);   memmove (&arr[1], arr, strlen(arr));   printf("String after: %s\n", arr);   return 0; } Both run as expected.
Anonymous
A simple help i need did anyone know about imgui?
Anonymous
Is ist for a game cheat ;)
Yeah exactly bro can you help me with that
mj12
Yeah exactly bro can you help me with that
https://github.com/ocornut/imgui/issues/1586
mj12
Tl;dr: you should open an issue on their github
Phil
Bro i need help
Sorry but #1586
klimi
A simple help i need did anyone know about imgui?
Yeah? Don't ask meta questions
Anonymous
Yeah? Don't ask meta questions
Bro i need help for designing a Ui [ user interface]
klimi
Bro i need help for designing a Ui [ user interface]
Oh sorry, i am not a designer, i am sysadmin and programmer, not front-end dev
Anonymous
100%
I know that and as well as i can design it by myself but i want to design a particular user inface
Anonymous
then design it yourself?
Bro so hard for me i can design the simple ones
DaviChan
As a game hacker myself: i habe to agree the gane hacking community is the worst and lazy af. Always need spoonfeeding unwilling to learn or do work
DaviChan
Ocornut kinda hit the nail on the head 😅
Anonymous
No bro basically i am modding the largest game server and people are playing and paying me for that
Anonymous
Fully online game
Dima
lol friend of mine got spammed with requests to send him imgui custom dock implementation for cheats back then seems like its forever
Anonymous
What game
Pubg, COD ,ETC
Sleeves
Pubg, COD ,ETC
That’s illegal tho
klimi
alright, this is offtopic here, please move onto the offtopic group
DaviChan
lol friend of mine got spammed with requests to send him imgui custom dock implementation for cheats back then seems like its forever
I kinda switched to nuklear. Anyone uses that? Not for cheats anymore, but for renderers and simple tools
DaviChan
also very easy to customize
Anonymous
That’s illegal tho
Yeah bro but people are still doing there is a huge network
DaviChan
Html_expert 🙃
klimi
MOVE TO THE OFFTOPIC
Anonymous
DaviChan
can have
DaviChan
MOVE TO THE OFFTOPIC
Where is that, sorry 😅
klimi
#ot
Anonymous
MOVE TO THE OFFTOPIC
Sorry I just wanna know about that
Dima
MOVE TO THE OFFTOPIC
this is not offtopic
Dima
kinda
klimi
this is not offtopic
discussing what games they develop? cmon how is that not offtopic
Dima
nuklear/imgui are both c/c++ at least
DaviChan
It is a C/C++
DaviChan
Library
klimi
nuklear/imgui are both c/c++ at least
i didn't have anything agains the gui, but the fact that they are just discussing modding games
Phil
I kinda switched to nuklear. Anyone uses that? Not for cheats anymore, but for renderers and simple tools
pretty good library yeah, except for the weird crashes that I was only getting in release builds
Anonymous
It is a C/C++
Yeah C / C++