Daulet
Daulet
sample = String("Test") There you rewritten object that created by default constructor with object that created by second constructor
First object had pointer to allocated memory. But then you have other object without allocated memory
Дон
First object had pointer to allocated memory. But then you have other object without allocated memory
Aaaah, you mean program in second line will create temporary class instance with immediately invoking ctor(const char*)?
Дон
Yes
I understand how fixe this, thanks!
Дон
Is it possible to avoid the potential memory leak? char* string = (char*) malloc(100 * sizeof(char)); void foo1() { string = nullptr; } void foo2() { string = ... //I want use the past allocated memory block, is it possible? }
0xJosh
Does anyone knows any place on the internet where I can learn how to write fully undetected malware programs?
Дон
It is possible if you write your own allocator instead of using malloc/new. But you shouldn't be doing it
Ok, I think in this situation I can just free memory and allocate it again.
Hitta
How to input 5:10 in c++
Hitta
How to input 5:10 in c++
I need to input this format
klimi
Uhm, what?
klimi
You just give the input to the program with whatever
klimi
Anyone help me with this? 🙏🏽
stackoverflow is a nice youtube channel that touches malwares and exploits
klimi
this sounds like promotion, are you promoting your services?
klimi
why don't you just send it here and just ask for dms? it seems wrong
Дон
Can anyone, please, give resources to learn assembler basics. I just want to know how my cpp program actually works via checking disassembly
pavel
Godbolt
\Device\NUL
You need to at least understand the architecture itself, there are arm, x86. But please don't do DOS assembly
/
Help me
/
{((unsigned char)(((int)param2)))}(ptr5, *(ptr4 + 48), param2, param3, *ptr4); what this code means
Eng
Hello I need help with this it's in C
Eng
Making an assembly in c
Chinepun💛
Please does anyone have any guide on porting a C/C++ Library to Rust
/
Can someone tell me what is this for {((unsigned char)(((int)param2)))}(ptr5, *(ptr4 + 48), param2, param3, *ptr4);
/
Its two days that i am asking it
Map
Google launched a new programming language called Carbon. It’s an experimental successor to C++ Here’s a code comparison between C++ and Carbon.
Dima
its a faulty language from its start just like any other which is trying to compete with c++
Chinepun💛
its a faulty language from its start just like any other which is trying to compete with c++
what about rust, i've heard people saying it's a safer language that does what c++ can do
Prince Of Persia
what about rust, i've heard people saying it's a safer language that does what c++ can do
It is safer language with changing the way you think of an object (narrowing and ...) So it's much harder to rewrite a code from C++ to Rust against rewriting a code from C to C++
Pavel
Can someone tell me what is this for {((unsigned char)(((int)param2)))}(ptr5, *(ptr4 + 48), param2, param3, *ptr4);
Is it all the code? It's impossible to tell looking at only this. Could be something like this, could be something else https://wandbox.org/permlink/2R0AG0YuvrEGGweo
🇷🇺 Ryan
lollllllllllll https://www.reddit.com/r/ProgrammerHumor/comments/wb6uaf/do_your_best/
Jollybox.h
I am looking for some sources to learn c++, ı am not complete beginner but still there are so much thing ı need to know
Erzbir
a book named c++ primer
Anonymous
Hi, has anyone ever worked with either site patreon or tee spring?
\Device\NUL
Yes
Did you only read the decompiled code and not reading the disassembly ?
/
this is all?
It's only one line
\Device\NUL
Shutz
Hello
/
th
What mean
\Device\NUL
What mean
I asks you about the disassembly part and you said you don't remember
\Device\NUL
Yes because i have decompiled it two days ago
My words is good luck for your reverse engineering journey
Jollybox.h
a book named c++ primer
isnt it outdated ?
\Device\NUL
Yes, decompiler can make revese engineering easier but there are rare case where you can't use decompiler and most read assembly directly
Jollybox.h
I dont want to check every concept that ı learn if it is still being used or not
/
But i forgot to watch the assembly when i was doing it
Abas K
hiiii how can I open the lock on my files that are on my hard drive I have the passwords but I want to copy them on my pc🔐 help me✋😩 s . o . s
X
struct stack{ int size; int top; int *S; }; void create(struct stack *st){ printf("Enter size: "); scanf("%d",&st->size); st->top = -1; st->S = (int *)malloc(st->size*sizeof(int)); } void display(struct stack st){ int i; for(i=top;i>=0;i--){ printf("%d ",st.S[i]); } printf("\n"); } void push(struct stack *st, int x){ if(st->top=st->size-1) printf("Stack overflow\n"); else st->top++; st->S[st->top] = x; } int pop(struct stack *st){ int x=-1; if(st->top==-1) printf("Stack underflow\n"); else x = st->S[st->top--]; return x; } int main(){ struct stack st; create(&st); push(&st,20); push(&st,30); push(&st,40); display(st); }
X
I expect from this code 40 30 20 but top is undeclared it says?
Дон
And correct if-loop in push function: if (st->top == st->size - 1)
X
aaa yes or st.top?
X
Yes, check display function
for(i=st.top;i>=0;i—) ı quess
X
because top is not declared lol in that function but ı need to use that from struct
Anonymous
What's the difference between stack and heap?
Дон
I want to declare a variable in a class, assign it some starting value and change it further, but I want the variable to be the same for each instance static int = ... something like this How to do this?
Anonymous
Are you tried google it?
Yea but Didn't understand 😓
Дон
Are you tried google it?
On the advice of this gentleman, I was able to find the answer to the question above, the question isn't actual :)
Дон
Yea but Didn't understand 😓
I would recommend finding a good book on C++ for beginners, there are consecutive topics. And there you will find the answer to your question.
Deniz Özgür
https://pastebin.pl/view/a0928f25 This is my code. When I close the program Visual Studio give error
Deniz Özgür
Exception thrown at 0x00007FFA6CE73C53 (ig9icd64.dll) in Proj1.exe: 0xC0000005: Access violation reading location 0x00007FFDAD089F50.
Prince Of Persia
Porting C code to shitty C++ is easy, porting C code to decent C++ is definitely not
Of course but it is easier than converting from C++ to Rust
Prince Of Persia
https://github.com/root-project/cling
Prince Of Persia
https://github.com/root-project/cling
Hey can I just some how use this with ndk for an Android app?