Chernykh
Because type void* can't be explicitly cast by compiler
Chernykh
Like static or reinterpret cast or c-style cast (char*)
Sourabh
Can we include *.c files? Shouldn't they always be *.h?
Anonymous
It's just a C language idiom
Nameful
You can include any file
#include "/dev/urandom"?
Sourabh
Oh, C preprocessor looks much smarter than I thought.
Sourabh
C preprocessor is dumb
But it handles directive quite well.
Anonymous
But it handles directive quite well.
It just copies the text of file...
Sourabh
To comment any code preprocessor is your best friend. Just #if 1 or 0.
Anonymous
Sourabh
It just copies the text of file...
Yeah, that's all the poor guy has got to do.
Anonymous
Do you know that in C++ using preprocessor for everything is not welcomed?
Sourabh
I prefer an IDE tools and hotkeys to do that
I wish my 16GB Linux setup could accommodate any space for IDE like Atom. I still use nano.
Anonymous
Inline functions instead of preprocessor functions Constexpr variables instead of defining constants with preprocessor
Anonymous
Modules (since C++20) instead of headers
Anonymous
So no macros you mean?
No macros for this purposes
Sourabh
No macros for this purposes
Damn. Embedded devs must be in trouble then.
Anonymous
Preprocessor is bad because it does not anything about C and C++ languages It operates with text, not a language
Anonymous
They are not removed
Sourabh
They have everything in Macros from helper functions to even constant variables.
Anonymous
And that considered bad
Anonymous
const variables, functions
Sourabh
Oh I see.
Anonymous
const variables, functions
You can use language itself to define them, not some "preprocessor"
Sourabh
You can use language itself to define them, not some "preprocessor"
Yup, I agree. It might be constraint environment a embedded devs have to work upon so they go with the preprocessor.
Sourabh
You know like 64 Bytes of RAM, 1KB of flash.
Sourabh
I still remember how we were assigned a project wherein we had to code a line follower with the above memory constraints.
Anonymous
How is the preprocessor better for this?
Sourabh
We had to use assembly after 4 or 5 functions in C.
Anonymous
(It does not)
Anonymous
Anybody knows how to calculate electricity consumption rate in c programming using arrays ?
Sourabh
(It does not)
Lesser function call
Sourabh
Try out Vim.
I used to use Vim.
Asdew
I used to use Vim.
Why do you not use it anymore?
Sourabh
Why do you not use it anymore?
I change my OS much more than my codebase. And nano is mostly built-in in every distro.
Anonymous
@sjchoure check inbox
Anonymous
I change my OS much more than my codebase. And nano is mostly built-in in every distro.
Just maintain a dotfiles repo and clone everytime you change distro. You can also create a script to symlink the config files
Anonymous
Stack Memory
1) constexpr variables does not take any space but acts like a language symbol
Anonymous
Lesser function call
C++ compilers are smart enough to inline and optimize functions
Anonymous
In 99% cases one line function will be inlined
Sourabh
Nothing of that is an IDE
Atom is good as an editor.
Sourabh
Nothing of that is an IDE
I use VScode too, to sync local and GitHub Repository. And of course the heat map too.
Sourabh
You can add extension to it.
Anonymous
Yes, you can, but can you have a profiler in VS Code?
Sourabh
I doubt that.
Anonymous
Working profiler*
Anonymous
I doubt that.
That's the point
Sourabh
Working profiler*
Which one do you use?
Anonymous
Which one do you use?
Visual Studio one
Sourabh
Visual Studio one
Which release?
Anonymous
VS2019
Sourabh
Awesome Possum
Sourabh
VS2019
They have improved UI/UX alot since previous releases
Sourabh
It was my first IDE too, when our college was insisting on using Turbo C / C++, I used VS.
Anonymous
My first IDE was CodeBlocks
Sourabh
My first IDE was CodeBlocks
That's a cool one too.
Anonymous
I do not think so
Sourabh
My first IDE was CodeBlocks
Well it's lightweight.
Sourabh
Easy to install.
Sourabh
VS takes hours to install.
Anonymous
Well VS Code with clangd language server is better than this
Sourabh
What's the thing with the 10 second timer on send button, a delay function?
Anonymous
?