Vlad
Basically it does x == (y & 0xFF)
R
Is c++ primer 5th edition is good to get started with c++
Anonymous
If you wanna learn some c++11 then better choose 6th edition
R
I want learn at beginners stage
R
Which YouTube you can recommend apart from new boston
Anonymous
Don't watch vedio, read book and go through example
R
Thank you for help 😊
Anonymous
Anonymous
Vitaliy ◀️TriΔng3l▶️
Anonymous
(unsigned)-1 == UINT_MAX
Vlad
Well that's weird that 0xFF promotes to 0xFFFFFFFF. Guess I'm gonna have to roll with it tho :P
Vitaliy ◀️TriΔng3l▶️
Anonymous
Through signed?
char can be either signed or unsigned — it depends on a compiler
At least that's the rules in C++
Vitaliy ◀️TriΔng3l▶️
Anonymous
Vlad
Vlad
Well played :P
Vitaliy ◀️TriΔng3l▶️
#include <stdint.h>
uint32_t to_uint32(int8_t i8) {
return uint32_t(i8);
}
movsx
ooooh :o
Vitaliy ◀️TriΔng3l▶️
but well, makes sense, for instance, if it was float rather that int8_t
Vitaliy ◀️TriΔng3l▶️
respecting traits of the original type
Vitaliy ◀️TriΔng3l▶️
Bits are not true if it's two's complement
Vitaliy ◀️TriΔng3l▶️
But yes
Emir
Anonymous
#include<stdio.h>
#define my_sizeof(type) (char *)(&type+1)-(char*)(&type)
int main()
{
double x;
printf("%ld", my_sizeof(x));
return 0;
}
Hi, Guys, I am confused about this program, why does it result 8? Thanks in advance
Vitaliy ◀️TriΔng3l▶️
has CLion memory view?
Yes, see Google Images how to access it and display variables in it
Vlad
Anonymous
double occupies 8 bytes
I know this, but confused about expression (char *)(&type+1)-(char*)(&type)
Vlad
Anonymous
Thanks
Ismael
/ban
Ismael
/add
RAMP
Hi
M__
i am trying to build a game using C
and i couldnt seem to find any source for function : delay();
M__
how do i implement delay() using for loop ?
Alex
use sleep
M__
sleep(millisecond) ?
whicch header file
Alex
#include <unistd.h>
int usleep(useconds_t usec);
Asdew
$ man 3 sleep
V01D
Stefan
V01D
If so, you might have a sleep function for the API. For SDL2 it is
SDL_Delay(time);
for example
V01D
Has any one worked with audio in C?
More specifically in calculating the FFT, and finally the power spectrum of a sample?
I am working on this, for an audio visualizer and was wondering if any one has a library they can recommend to work with FFT. (I am thinking about SFML, fftw3, or kiss FFT. (Open for anything new, too))
V01D
Ok
M__
V01D
Ok, cool
Vlad
Vlad
Or it's some unistd.h implementation?
M__
piggyho
/get rules
Anonymous
guys wtf
Anonymous
how does C99 complex.h have an operator overload for complex multiplication ?
Anonymous
@unterumarmung is the openapi parallel compiler a separate compiler or they just contribute their changes to clang?
Anonymous
Anonymous
oh i found some documentation on building
Anonymous
github.com/intel/llvm
Anonymous
Anonymous
Anonymous
OneTBB for example doesn't depend on DPC++ compiler
Anonymous
OneMKL afaik either has some features for DPC++ or depends on DPC++ compiler
Anonymous
oh
Sherlock
How to pass 2d array on c in a function? I looked or up on geeks for geeks but Hacker rank shows error that way
klimi
Daniele
what's a 2d array?
Daniele
a matrix?
V01D
Lol.
Anonymous
I meant something different and that's why deleted this
Kenny
Anonymous
V01D