.
/get great
Badugar
Vladimir
Vladimir
It's stands there because d is for int
Vladimir
lf = double
Vladimir
It's just it
Vladimir
There's only few modifiers
Vladimir
l ll h hh
Vladimir
With different letters we got different types
Vladimir
hhd = char
Vladimir
hd = short int
Badugar
d for int, lf for double ... may have historical reasons, consider the time C was invented, but still ...
Vladimir
As I said f is double now
Badugar
Badugar
So what is float ?
Vladimir
You just can't send float
Badugar
Also .. does a long long float make sense ?
Vladimir
Probably it will be long double but I'm not sure
Vladimir
lld is long long int 100%
Vladimir
In my printf I used "Lf" to long double
Vladimir
ll = L in GNU but it's not portable
Vladimir
Thor
Guys,,oop using c++ & HDL
Which one is better?
Badugar
Thor
Hardware description language
Anonymous
How to use python code in C ( visual studio )
Anonymous
Can anyone tell me a good stuff for this
Nazir
I got this code from internet. I neee to convert it into kottlin. I had problem with some code that I dont understand. can anyone tell me what is thiss code suppose to do:
Nazir
#ifndef NAN
# define NAN (std::numeric_limits<double>::quiet_NaN())
#endif
// check whether of not a floating point value is not a number
inline int isNAN(const double v) { return(v != v); }
Anonymous
It defines a macro called NAN.
Anonymous
Every istance of NAN is replaced by that code snippet.
Anonymous
Here is what it does:
Anonymous
https://en.cppreference.com/w/cpp/types/numeric_limits/quiet_NaN
Anonymous
and the inline function below that is obvious.
Anonymous
As you see, NaN != NaN, but every other value v satisfies v == v
Anonymous
SO you can use that fact to check whether a number is NaN or not.
Anonymous
Why they return an int instead of a bool? No clue, maybe they have to be C-compatible.
Nazir
thank you
Anonymous
No problem.
Anonymous
You misspelled the constructor
Z e n i t s u
Anyone Solevbing This please tell me.\
Z e n i t s u
Anonymous
also, please use something like ideone.com
Anonymous
line 12
Z e n i t s u
thx for advice
Z e n i t s u
Anonymous
You're using pretty old C++ btw.
Anonymous
let me see
Anonymous
wow, g++ refuses to compile it for me.
Anonymous
he
Anonymous
let me renew your code a tad bit
Z e n i t s u
turbo c++ maybe system error
Z e n i t s u
Anonymous
You're dealing with very, very old c++, and my compiler won't even compile it.
Anonymous
I don't think you'll get much help with such old c++
Anonymous
I suggest you begin learning C++11
Anonymous
or even C++98
Anonymous
https://stackoverflow.com/questions/15680190/what-is-the-diff%C3%A9rence-between-include-iostream-h-and-include-iostream
Anonymous
/get findprojects
Anonymous
turbo c++ maybe system error
To make it more modern you should change the includes to #include <iostream> and #include <cstring> (although <string.h> would work too.)
Anonymous
and then use
using namespace std;
Anonymous
That is, if your compiler even supports newer C++.
Z e n i t s u
ॐकार
Thank you.!
I have read the pinned message now. 😊
Anonymous
I use it carefully. Never had any trouble with it.
Anonymous
I never use it in headers though.
Anonymous
Thanks.
Anonymous
I only advised him to use using so he could run his code with minimal effort.
olli
I only advised him to use using so he could run his code with minimal effort.
The thing is, people who started using it tend to keep on doing so. So I'd rather prevent people from doing so in the beginning.
You probably wouldn't suggest to omit free calls in C because it's "less effort"
not that important anyway :D - I just think the best way is to "learn it the right way from the beginning" because changing is hard
Anonymous
True, strangely most people I've seen teach it with using namespace std;
Anonymous
Bad education I guess.
olli
Anonymous
The reason is written right there....
olli
have you read the rules? You don't want people to steal your work either
Anonymous
On a side note, I didn't notice there was a rule about turbo c++...ah well