Benedetto Califfo
However you can write it in decimal using %d in printf easily
András
András
You have to cast it to int previously
Benedetto Califfo
I think u re right
Benedetto Califfo
I haven't programmed using c for years ahah
Ariana
just subtract by 0x30 to get int¯\_(ツ)_/¯
数学の恋人
one question guys, say I need to take input in my program,
数学の恋人
but I know that input is restricted say it's only allowed to give input as integers from 1 to 100
数学の恋人
is it possible to optimize performance here?
数学の恋人
like instead of doing usual way int n; std::cin >> n;
Ariana
The most i can think is read a character subtract 0x30 check if its 0-9 if it isnt break, else loop
Billy
is it possible to optimize performance here?
Did you already mesure that input is your performance bottleneck?
Foxner
Hi. Is there any simple way to access a protected or a private member of a class for debugging purposes? Or do I have to modify the class in order to peek into an object's internal state?
Foxner
Debuggers such as lldb are able to inspect private members, not sure what you consider "debugging purpose"
But it's not possible to do with just language itself? So far the simplest solution I found was to comment out access specifiers and just put public: at the start of the class.
Foxner
How do you debug your code? After compilation there are no access modifiers anymore
Oh, by simply outputting various variables during runtime.
olli
Oh, by simply outputting various variables during runtime.
That's not the best way to debug your code. You could create a public method that dumps all the fields.
pratheep
Can anyone say how this program have been evaluated
pratheep
🙄
Anonymous
Is it? Doesn't the comma operator guarantee the order of evaluation?
Anonymous
Rose is sleeping🌚
Anonymous
Is it? Doesn't the comma operator guarantee the order of evaluation?
Or it can evaluate in random order and return just the last one?
olli
Is it? Doesn't the comma operator guarantee the order of evaluation?
The order or evaluation of function parameters is not defined, e.g. clang has a different one than gcc.
olli
Well, comma operator is not a function technically..
a function call does not invoke the comma operator though
olli
A function call is a postfix expression followed by parentheses containing a possibly empty, comma-separated list [...] [expr.call]
Anonymous
a function call does not invoke the comma operator though
Of course, in a function call it is just a separator
Anonymous
a function call does not invoke the comma operator though
Look at line 14, there's no function call
olli
oh damnit just saw it - nvm :D totally missed it on my phone - sry
olli
I guess that's why sharing pictures of code is a bad idea ¯\_(ツ)_/¯
olli
Can anyone say how this program have been evaluated
x++ is executed (x is 11), then ++x is executed and assigned to y, so x and y are 12
pratheep
(There are 2 values inside the bracket)
pratheep
How only one value is returned
olli
How the variable y got the value 12
by assigning ++x to it after evaluating x++
Rafi Faseeh
Java is support here???
klimi
Java is the next door
Rafi Faseeh
Java is the next door
How to find it please?
Anonymous
How to find it please?
Search on telegram guide on Google
Dav
Hello
Dav
Ya
klimi
Ya
Dav
Any order thing
Dav
????
عزة
hi gus
Dima
goose
عزة
can you halp me??
عزة
How can write program databas for students. avrge and Gender؟؟
Tobias🐾🚲
How can write program databas for students. avrge and Gender؟؟
Did you not have basic database setup and configuration so far? Or is the task to create your own?
pratheep
András
Even vscode is better than visual studio
Oleksandr
lol vscode sucks vs visual studio
Oleksandr
I’m both vs code and VS user, and vscode only good for editing file or two. If you have more - you’ll end up with spending more time fixing configs for intelisense than actually working
András
lol vscode sucks vs visual studio
Visual studio is the worst ide for cpc++
Oleksandr
mac users says same about xcode
András
I’m both vs code and VS user, and vscode only good for editing file or two. If you have more - you’ll end up with spending more time fixing configs for intelisense than actually working
I was working with visual studio, and I hate that experience. It was time, when ide refuse to open the file, becouse it's is already open, but it's close
András
It's time when I need to save my code every 5 seconds, becouse I don't know when ide will crash
András
It's time when my compiler suddenly forgot where is all my libraries
Oleksandr
Really sorry to hear that. I was lucky enough to not experience crashes more that once a week, so I have a very positive experience, comparing to vs code and xcode(its sucks that macs does not have c++ support in mac VS)
数学の恋人
It's time when my compiler suddenly forgot where is all my libraries
You shouldn't blame your doing/lack of knowledge over to a peice of software
数学の恋人
also #ot
数学の恋人
#ot
Tobias🐾🚲
is you want say I don't know yet database???
I want to ask what the (probably assignment) is about. Do you have to write your own basic database or are you asking how to setup a way with a pre-existing database to store the data?
Anonymous
What does mean ( %.2f )?
qwert
float precision two signs