Hugh
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.
klimi
Elnee
klimi
Elnee
Elnee
Woof
klimi
Elnee
*pat pat*
Sorry I mistook that group with OT
Elnee
lmao
Hugh
Elnee
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
Mihail
For integers
Alarm
Hii
Alarm
Friends
Alarm
Can i ask a doubt about iphone???
Francisco
Mihail
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.
Ибраги́м
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
😹
olli
Daniele°
Riccardo
ಠ_ಠ
🐰🐾 سمیه
Let’s say our computer has 4K of memory 
🐰🐾 سمیه
Rohit
🐰🐾 سمیه
🐰🐾 سمیه
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
BinaryByter
but thats because gcc is bad