Astral
So void is only valid in c++?
klimi
ok
Sagar
int main() instead of void main and return 0;
klimi
what
Samuel
Hello, please I need help with something
Samuel
Code to skip courses in Alison?
klimi
Code to skip courses in Alison?
Okay, what's the issue with that
Samuel
I just need it to submit an assignment
klimi
What's your issue with c/c++
Samuel
Thanks
klimi
You're welcome
BinaryByter
what?
Raul
I just discovered this: https://stackoverflow.com/questions/16380966/non-const-reference-bound-to-temporary-visual-studio-bug
Raul
My coworker has code that compiles that shouldn't and that is because VS is hot garbage and has this thing called a compiler extension.
Anonymous
Anonymous
why would it be #?
Anonymous
i didn't get that part
Anonymous
can someone explain!
olli
My coworker has code that compiles that shouldn't and that is because VS is hot garbage and has this thing called a compiler extension.
MSVC != VS.. MSVC issues a warning. Without pedantic flags g++ enables language extensions as well... For MSVC I'd suggest /permissive-: source>(14): error C2664: 'void foo(Zebra &)': cannot convert argument 1 from 'Zebra' to 'Zebra &' <source>(14): note: A non-const reference may only be bound to an lvalue
olli
I'm using gcc and it catches this. I think my coworker turned on that flag for some reason.
Yeah since this is no extension to GCC. But recent versions of g++ default to -std=gnu14 instead of -std=c++14 and enable extensions by default as well. I don't the idea in general to have extensions enabled by default.
olli
why would it be #?
291 overflows the range of a single octet, since 35 = 291 % 256 and the char for the ascii value 35 is #, it will be printed (http://www.asciitable.com/)
olli
Don't like the "A signed char is the same as an ordinary char` part... n1570 says: 6.2.5#3 "An object declared as type char is large enough to store any member of the basic execution character set. If a member of the basic execution character set is stored in a char object, its value is guaranteed to be nonnegative. If any other character is stored in a char object, the resulting value is implementation-defined but shall be within the range of values that can be represented in that type." and 6.2.5#15 "[...] The implementation shall define char to have the same range, representation, and behavior as either signed char or unsigned char"
olli
that helped! thank you 😊
great! you're welcone :)
Anonymous
Anonymous
nested statements without using functions?
Anonymous
ohh thanks 😅😅😅
Anonymous
Hey
Elnee
What does auto and type alongside mean?
klimi
Nikolas
What does auto and type alongside mean?
It's the old meaning https://en.cppreference.com/w/cpp/language/storage_duration
Anonymous
Hello
klimi
hi
Anonymous
Hey
Anonymous
How are you
MᏫᎻᎯᎷᎷᎬᎠ
Good
Anonymous
Missed you all 😊
klimi
same same
Aurora
How to join my Telegram Bot to public group
klimi
just click add and chose your bot
Anonymous
What does auto and type alongside mean?
auto refers to automatic storage class..
Aurora
it just can join group by myself
klimi
no
Anonymous
Greeting to everyone
Anonymous
BinaryByter
yes, they are called scopes
Anonymous
Does it change anything if we dont use auto before int?
Auto in old cpp compilers are also know as storage class specifiers, so an auto before int means an integer with automatic storage class. In modern compiler something like auto i =40; will automatically initiliaze the variable i as integer i.e auto is type inference operator also
BinaryByter
by default every variable is an auto storage calss
Anonymous
Not every variable, but one with static alloaction is always automatic, one with dynamic allocation (heap) is a non-automatic storage class and it is responsibility of programmer to destroy them before the program exits
Dima
Lol.
klimi
Lol.
Looool
Elnee
Looool
Looooooooool
miko
Looooooooool
l+o*1e9+l
Elnee
You win
miko
Dima
malloc/free ftw.
joel
how do I read a column of integers from a text file into an array in c++?
klimi
malloc/free ftw.
can you give an examle?
klimi
ftw means "for the win"
Anonymous
/get cppebook
Anonymous
/get cpp Ebook
Dima
klimi
thats nice
klimi
Welcome
klimi
Welcome
LEGION 5
Hello guys Which the best IDE for C++ on linux?
LEGION 5
😊
Ludovic 'Archivist'
Hello guys Which the best IDE for C++ on linux?
There is no such thing as a best ide
Ludovic 'Archivist'
Only bad ones and usable ones
Nomid Íkorni-Sciurus
LEGION 5
There is no such thing as a best ide
I know that sorry.. I mean the good