Hugh
But it works
Mimi
Why?
Idk, number greater than infinity is hard to accept
Hugh
Yep
Mimi
But it works
I believe you😅 I'm just new to c++ so I'm not familiar with this
Hugh
I solve olympiad problems
Hugh
So in this kind of programming you know input limits
Elnee
What plugings do you suggest.
surround.vim for autoclosing coc.nvim with clangd for completion NERD Tree for navigation Syntactic for errors and warnings Also list characters to see all invisible characters. Pretty useful.
Elnee
*pat pat*
Wat? :D
klimi
Wat? :D
Yoire good boy
Elnee
Yoire good boy
Thanks 🙂
Elnee
Woof
klimi
Woof
*pat pat*
Elnee
*pat pat*
Sorry I mistook that group with OT
Elnee
lmao
Hugh
Oh, it's useful
Alarm
Hii
Dima
welcome
Francisco
Be careful. Division by zero is inf for floats, but for integers is undefined behaviour and your program may crash
Mihail
For integers
Alarm
Hii
Alarm
Friends
Alarm
Can i ask a doubt about iphone???
Francisco
Can't think of a situation where your program won't crash
It's undefined behaviour, everything can happen
Hakker
hello every one
Hakker
anyone have idea to make game on C?? codeblocks
Hakker
or anoyone have source game, by which i can learn
Raul
I am about to ask a very beginner question so I am sorry.
MN
can someone explain to me how the c programming works? and what is nested if , do while loops?
Raul
is this: header: class A { public: A(int a); private: int &foo; // constructs with int }; source: ClassA::ClassA(int a) : foo(20) { }
Raul
the same as: ClassA::ClassA(int a) { foo = 20; }
Raul
Okay, maybe that is a bad example. I guess what I am trying to ask if they are the same thing. Say I have a class that takes a QWidget *parent in the constructor.
Raul
And in my header file I am creating a reference to that, so Class &class;
Raul
then in the source file I initialize it with something in the ui, so class(*ui->horizontalSlider)
Raul
is that the same as doing Class &foo = *ui->horizontalSlider;?
Raul
Well, I am truly at a loss then.
Raul
For some reason, if I initialize uiSlider(*ui->horizontalSlider) and I call uiSlider.setValue(20) the code crashes.
Raul
However, if I declare somewhere in the code: Slider &foo = *ui->horizontalSlider foo.setValue(20) the program does so happily.
Ибраги́м
Because you f****** didn't read the rules
What should we do with this pesky user
Anonymous
Helo every body
Raul
So this is why it crashes? fack.
Raul
Because my controller class takes a reference of classes, and not pointers.
Raul
I create a base class Slider, SpinBox, and CustomClass, I then do Controller<Slider,SpinBox,CustomClass controller;`
Raul
I can then set all of their values at once by calling controller.setValues(20) which then calls each of their respective setters.
Raul
However, I need to make them references, but I need them to be private: Slider &uiSlider; SpinBox &uiSpinBox; CustomClass myClass; Controller<Slider,SpinBox,CustomClass> controller;
Raul
However, this requires them to be initialized before the horizontalSlider is properly initialized I guess.
Raul
so now I am definitely stuck.
Anonymous
So when i declare a var in my header file
Anonymous
And init it in the cpp
Anonymous
It's somehow still 0 wen using the var
Anonymous
http://this.is-a-professional-domain.com/7JFKjA5.png
Anonymous
http://this.is-a-professional-domain.com/6PM2yCW.png
Raul
Thank you so much, I have been banging my head at this for days. I decided to wrap them into unique_ptr's and then assign them in the scope of the constructor. This works perfectly now.
Anonymous
Logger is namespace
Anonymous
Logger::Logger is a class
Dima
> So we put Logger into a Logger class so you can have loggers anywhere
Dima
😹
🐰🐾 سمیه
Let’s say our computer has 4K of memory 
olli
How much is 4k?!
context missing: probably 4096 Bytes (4 * 1024B)
🐰🐾 سمیه
context missing: probably 4096 Bytes (4 * 1024B)
I think on a 64 bit memory when we declare a variable to be of type char or int, it actually uses all the 64 bits, except that it uses less than that. Correct?
🐰🐾 سمیه
For example if a declare two variables of type int, each of them use 64 bits ( a total 128 bits)
klimi
Yes
klimi
Well yes and no
klimi
It doesn't have to be necessary whole 8bytes, there could be packed more ... Like 4 chars
klimi
@BinaryByter knows more
🐰🐾 سمیه
Ok
BinaryByter
but thats because gcc is bad