Wim
Or is it just that you're seeing the complete stupidity about it you're now turning?
Wim
I do vouch for good libraries though and using them
Wim
But they shouldn't require an extra 1G of memory EVER
Wim
Hold on there
Wim
We're talking about dumb fragments of a number
Wim
You're telling to include a whole library for something thats so easy it should be in a textbook
Wim
Not having pip or whatever is no excuse to that
Francisco
Wim
Precision outside IEEE specs pretty much falls out of any specification, so don't expect it to be in it as it tried to adhere to standards
scammer.xyz
Wim
How does that relate to the fact that IEEE encoding is not endless but for the extra precision you'd like to have you can simply write a few lines of extra code instead?
Francisco
Wim
If you'd put half the effort in writing it as you did in trying to justify the "I don't have to think about it and just grab a library" as you did here, then its a few lines of extra code; if you want to find a good library it'll take hours or even days to make sure its fit for the job which you could've done already, multiple times by now
Farhan
Hello
Francisco
Dima
do you even read the rules lol. it’s for unrelated discussions
Rekha
Why c language is platform dependent? And independent?
Wim
Rekha
What is assembly language?
Francisco
Rekha
But I don't understand
Rekha
Why character data type is under intergal category
Wim
MᏫᎻᎯᎷᎷᎬᎠ
What are the differences between std::string and std::string_view?!
Rekha
No
Rekha
Why character data type is under intergral category?
Wim
Assembler only distincts between value-sizes, any character is just a value?
MᏫᎻᎯᎷᎷᎬᎠ
Wim
Anonymous
My dear friends,
Sorry to ask silly small question,
Though I'm aware of some sites , Could anyone please suggest good C++ sites for learning.
Rekha
Thank you so much @Drazzy @BOND_0O7
olli
Thats C, not assembler?
True, I think he meant: "Why is char considered integral in the standard documents"
MᏫᎻᎯᎷᎷᎬᎠ
Wim
Probably, Olli, I thought he was still going on about Assembler
Roberto
Hi guys! I was readin this code. I don't understand why there is a getline instruction before the while loop with se same getline as argument.
Can you explain me?
Anonymous
My dear friends,
Sorry to ask silly small question,
Though I'm aware of some sites , Could anyone please suggest good C++ sites for learning.
Roberto
Ибраги́м
https://www.reddit.com/r/cpp/comments/bsflbt/noone_knows_the_type_of_char_char/?utm_medium=android_app&utm_source=share
Ибраги́м
I give up
MᏫᎻᎯᎷᎷᎬᎠ
Mihail
olli
So you mean getting the address of the substring
e.g. like this.
#include <string>
#include <string_view>
#include <iostream>
int main() {
std::string foo{"Hello World"};
std::string_view first_word{foo.c_str(), 5};
std::string_view second_word{foo.c_str() + 6, 5};
std::cout << first_word << ' ' << second_word << '\n';
}
first_word and second_word are only views into the foo string.
In comparison to only pointes, string_view provides iterators, searching and so on
Rekha
Sorry
Rekha
@MissRose_bot
Mihail
that's a bot
Mihail
and don't do that again or you'll get banned
Rekha
Sorry I don't know how to use telegram that my first day. Please don't me banned.
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Thaaanks
Mihail
Rekha
Why we need to Standardization in c programming language?
Saqib
👍
Saqib
Daniele°
Anonymous
Anonymous
Saqib
#include <stdio.h>
int var = 20;
int main()
{
int var = var;
printf("%d ", var);
return 0;
}
Saqib
Predict the output?
Saqib
Answer says: Garbage value
Saqib
The explanation given was "First var is declared, then value is assigned to it. As soon as var is declared as a local variable, it hides the global variable var."
Saqib
What does it mean here to hide the global variable var?
Saqib
how can it hide globall variable...?? also how can int var =var ; be valid statement means how can we assign var to var...?
Tushar
Within the body of a function, a local variable takes precedence over a global variable with the same name. If you declare a local variable or function parameter with the same name as a global variable, you effectively hide the global variable.
olli
how can it hide globall variable...?? also how can int var =var ; be valid statement means how can we assign var to var...?
Shadowing or Hiding works by declaring another variable with the same name in a local block (scope). e.g.
int main() {
int f = 1;
{
// the only f declared is the one set to 1
printf("%d\n, f);
// shadow f in the current scope
int f = 2;
// f has been "shadowed" and set to 2 above
printf("%d\n, f);
}
// the local f (only one exists) has been set to 1
printf("%d\n, f);
}
What's the output here?
It's nothing special to C/C++
https://en.wikipedia.org/wiki/Variable_shadowing
Saqib
Oh okay so according to this the outputs will be 1
Saqib
then 2
Saqib
then 1
Saqib
Got it.
Saqib
Thanks
Tushar
Output is 1 only.