Nameful
_______________^ syntax error at ) missing :
I like how it keeps moving right
Dima
I like how it keeps moving right
Yes I couldn’t see right
Asad
hello guys. i need to build GUI. what do you recommend using?
Dima
It’s immediate though
Dima
But it’s cool
Dima
“Dear Imgui” is full name
Pavel
yes
Anonymous
sed
Asad
Qt is pretty neat in my opinion
it is not free i guess
Pavel
what do you have against it? :)
Pavel
it is not free i guess
AFAIK it's free and open source
Pavel
“Dear Imgui” is full name
that's also a cool thing, but not sure how scalable it is I want to integrate it to my game for debug menus
Dima
what do you have against it? :)
I thought it’s not flexible for gui
Dima
Well my choice is “dear imgui”
Asad
what about sfml
klimi
what about sfml
Well thats just GUI... But does it even have something like buttons etc?
Dima
my project?
Take a look at Lumix Engine It uses imgui for everything
Dima
GitHub repo
Pavel
what about sfml
as far as I know (again), with sfml you'll need to write your own gui library as it only gives you low level tools for that
Asad
Sfml
you can code them.
Patrick
Hi, in C, how do you open a file for writing whereby you can seek and replace bytes in-place? I'm looking at these docs and neither of the write modes preserve existing contents.
Hermann
if i have a difficult computational problem, does it make sense to use threads?
Noor
Dima
what?
Nameful
I like Rust's naming convention
Nameful
C doesn't have one though, no?
Dima
I am using c# convention in c++ code lol
Anonymous
C++
Nameful
I am using c# convention in c++ code lol
Doesn't VC++ provide the C++ stdlib in PascalCase even?
Dima
¯\_(ツ)_/¯ I don’t use vc++
Dima
c++/cli
Nameful
What compiler do you use?
Dima
pure c++, not vc++ or cli
Dima
got addicted to that convention after looking at UE4’s code
Dima
clear, readable
Jagadeesh
Rules ?
Anonymous
hi
Anonymous
anyone know about the size of virtual inheritance class
Anonymous
Anonymous
in this case size(classB) is 24, but after removing char a, size(B) is 8
Anonymous
I'd appreciate it if someone could help me out
Avezy
Padding Bytes maybe
Anonymous
but the size is 24 and 8, if it is padding, it should be at most 16
Avezy
Optimizer playing tricks maybe youve got two times vptr + padding If the Compiler Cannot optimize it
Avezy
https://godbolt.org/
Avezy
Just Look at it in Compiler explorer
Anonymous
thanks! so it depends on my compiler
Asad
holly crap! what the heck virtual inheritance is?
Dima
I forgot the full name lol
Dima
diamond something..
Asad
diamond something..
"Deadly Diamond of Death"
Dima
no
Ajay
struct X{ map<int,X*> mp; }; void fun(X* root){ root->mp[6] = new X; } int main(){ X *root = new X; fun(root); } 1. Wanted to ensure that, on the call of fun(X* root), root->mp[6] resides in heap and the newly created X is also in heap. So, a pointer in heap points to something on heap. 2. Does delete(root->mp[6]) deletes the the newly created object?
Asad
anyways. this concept makes a lot of sense
Anonymous
It's ugliest
Anonymous
Use smart pointers
Ajay
Don't use raw new and delete
raw ? What does that mean buddy
Ajay
BTW, what's the problem using new and delete here
Anonymous
In modern C++ in most cases manually managing memory with new and delete keywords is bad practice
Ajay
In modern C++ in most cases manually managing memory with new and delete keywords is bad practice
didn't get the term "manually managing memory" in this context. Can you point it out?
Anonymous
And how to use them
Anonymous
And why using new and delete is bad