Savta
Do you guys cast mallocs when writing strictly C, if yes - why? If no - why?
mov $22, %rax
mov $22, %rax
and that's a good practice
z
yes, because if you don't you get a warning
No, you don't have to cast the return value of malloc in C. It does not yield any warning at all, even with -Wall -Wextra -Weverything -pedantic. That casting practice is only for C++, not C.
Savta
yes, because if you don't you get a warning
Since it's a void pointer I always find it unnecessarily redundant, but at Uni they, teach us that it's a must without providing a good explanation
z
Since it's a void pointer I always find it unnecessarily redundant, but at Uni they, teach us that it's a must without providing a good explanation
I think it is only a must if you code in C++. So if you want some part of your C code is portable to C++, then it is a good habit.
Anonymous
Use set precision from iomanip
Serhat
thanks anyway
Anonymous
https://stackoverflow.com/questions/57882748/remove-trailing-zero-in-c Or follow tested advice from here
Sandro
I think it is only a must if you code in C++. So if you want some part of your C code is portable to C++, then it is a good habit.
But why not? I think is a good practice for portability (by compilers point of view) and to be sure that everything works well... At least but not the last for readability
ken
Hello. Good day guys. Please what is the best and easy to understand (based on study materials) C++ GUI library/framework one can work with?
g3rm4n
hey every one, i have some issue with dynamic memory allocation and class composition... i need to create a tic tac toe game in C++ with 4 classes. i have a class named Cell and class named Board. while i composite Cell in Board and allocate the memory for object 'board' i got an error "Exception thrown: read access violation."...
HaiNahi
Use sdl
HaiNahi
SDL is simple
Nameful
SDL is simple
It's not a GUI framework though
ken
Gtk vs wxwidget?
HaiNahi
You can reinvent gui building on sdl I didn't did that till now
ken
Just need something I can come up to speed quickly over this weekend.
HaiNahi
Why tho?
Better to reinvent rather than using messy software
HaiNahi
We can build that in a few days not bad
Vlad
Also you have a lot of chances for your software to become even messier
Vlad
Cuz now it's your shitty code lmao
HaiNahi
We can understand ourselves better ;)
Gustavo
I've heard he's really good
a Semicolon
Hey guys I want to do reverse engineering should I go for C/C++? And please recommend me steps to be a reverse engineer
Anonymous
/get cppbookguide
mov $22, %rax
thank you
"Yo beat a hacker, you have to copy things done by other people"
Anonymous
I've heard he's really good
You're getting master's at MIPT?
HaiNahi
Pls help how do win32api programming on codeblocks
HaiNahi
It is showing undefined reference to winMain
HaiNahi
I am trying the whole time it didn't work
Anonymous
Add to your code int WinMain() { return main(); }
mov $22, %rax
Still same error
send the code in a pastebin
tartaerae
Excuse me, may i ask?, i have code If(j==(i-2){ printf("%d",j); Can i add if else again the i-2, to i-4, i-6, i-8, i-10, using for loops? Thank you
Pavel
Excuse me, may i ask?, i have code If(j==(i-2){ printf("%d",j); Can i add if else again the i-2, to i-4, i-6, i-8, i-10, using for loops? Thank you
Yes, replace 2 with your loop counter (either multiplied by two, or increase it by two each step (k+=2 instead of ++k))
Pavel
Is it? If(j==i-(for (int k=0; k<=n; k+=2)))
the other way around, loop should be outside and if inside
Pavel
for () { if () { ... } }
Pavel
Can we ignore values in structured bindings as we do in std::tie with std::ignore?
Pavel
Not now
Is it planned in some new standards?
Anonymous
There are some proposals about it with pattern matching
Pavel
Just need to suffer another decade :D
Anonymous
Just need to suffer another decade :D
Nah, I don't think so They plan it to C++23, C++26 top
HaiNahi
pastebin.com/X8UQ3hQ6
HaiNahi
New prb code runs console opens but no window
HaiNahi
New prb code runs console opens but no window
Fixed but win32api is slow :'(
Kenny
cl.exe 0xc0000006 error
Kenny
what happened
z
what happened
Error happened.
Kenny
how to solve it
Anonymous
how to solve it
Stop touching your keyboard
z
how to solve it
Do you think that you have provided enough information to ask that?
Kenny
I use WDK to compile, it returns -1073741818 when compiling for target x64
Anonymous
Do you think that you have provided enough information to ask that?
Kenny
It's Microsoft's bug
Kenny
😒I remove the EWDK ISO and reload it, the problem has solved
Anonymous
It's Microsoft's bug
No, I don't think so
klimi
a lot of practise
a Semicolon
Practice and knowledge of assembly
I want to hack games basically and crack apps like login
a Semicolon
Illegal stuff, eh?
Not for public just for knowledge bro