NXiss7
Anonymous
Anonymous
https://www.artificialintelhub.com/2019/06/introduction-to-artificial-intelligence.html?m=1
Ajay
struct comp{
int a,b;
bool operator < (const comp &o) const{
return ((a!=o.a)?(a>o.a):(b<o.b));
}
};
Is there any rule for making the comparison operator const? Like if I remove the const in front of the operator< then it throws some errors.
NXiss7
Abhishek
Send me a functions in c lectures
Anonymous
Honestly randomness is debatable
Anonymous
I could have an RNG that just says 1111111111111111111 and be like
"Yep, seems random enough"
Anonymous
Tbh it is
Anonymous
Wanna run a FIPS test?
Anonymous
There is no such thing as true randomness
Anonymous
/dev/random is not guaranteed to be truly random
Anonymous
In fact these days it's the same as urandom
Anonymous
Honestly I'd rather not use something as weird as BSD to prove my point
Anonymous
Also the original generator I intended this to be a copy of fares almost the same in FIPS tests
Anonymous
Which was just uuidgen | sed -s "s/-//g"
Anonymous
Well that be the intended purpose of that code anyway
Anonymous
I posted it because I made that to solve one of my own problems
Anonymous
And randomness doesn't even matter as long as the string is unique for my application
Anonymous
Pretty sure they are honestly
Anonymous
The fact that AMD can ship a broken CSPRNG and it's not noticed in testing only to be noticed on arch Linux later on does tell you something
Tushar Goel
#include<stdio.h>
#include<string.h>
int swap(int x,int y)
{
int temp;
temp=x;
x=y;
y=temp;
return x,y;
}
int main()
{
int a,b;
scanf("%d %d",&a,&b);
swap(a,b);
printf("%d %d",a,b);
}
Tushar Goel
what's wrong
Tushar Goel
But why
Tushar Goel
I mean will it work in case of pointers and why it didnt worked in my case
Anonymous
Alright I get you
Anonymous
Sorry was wrong there I read the wiki
Tushar Goel
Ohhhh okay
Anonymous
Ok
..
Tushar Goel
And can function return multiple values?
Tushar Goel
Okay , thanks buddy
Anonymous
Yeah should have chosen my words correctly
Dima
one more post (as I see it was the second one), you’ll get yours
Wisenky
Anyone has a good document for client, server , socket things to make a console communiation program with cpp for a beginner ?
Dima
Dima
explains stuff in detail
Wisenky
Anonymous
is there a possibility to return an array, which is created dynamically in a function, to the main?
Anonymous
you can return pointer to this dynamically alocated memory
Anonymous
oh ok thanks, i thought it would not be in scope anymore
Asdew
When you allocate memory, it is there until you free it.
Anonymous
nvm, malloc prepares me some memory on the heap until i use free on it
professor
what is the best way to reproduce an example of reading beyond the memory sensitive information `varibles, vtables, etc under MSVS ?
lotuslwt
why the comment color is different in vim?
lotuslwt
lotuslwt
I googled, it said 'let c_comment_strings and unlet', it is so quirky.
Đỗ
VIM is not aim for C++, it also be use in large scale, including script language
Đỗ
so it's color to mark up something to indicate/warning user about inside contents
Anonymous
Hello
Anonymous
Guys
Prashant
Good morning😊
emmanuel
Hey guys.Working on some IoT project and I have encountered this challenge.I have this sensor reading (float).I want to convert it to a char array and concat it to another char array.I have tried everything I can and I still get compiler errors.C++ isn't my first language.
emmanuel
I have also googled all I can
emmanuel
Any help?
Anonymous
i m facing problem to code beam search for a tree in c
itsmanjeet
is their any way to convert
vector to list of arguments
to pass them in functions ...
Anonymous
Hello.
srun -p ac -n1 --cpus-per-task=24 HelloOMP
Does anyone know how I can see the queue submission of the execution and the result of this execution as returned by the queue manager?
Anonymous
emmanuel
I solved my issue.Dont worry
Mar!o
Hey guys, is it UB to allocate something using malloc and then casting the const ness away like:
const int *i = malloc(sizeof(int));
later:
*(int*)i = 6;
AFAIK it is not because malloc space is not contant itself ?!
I'm creating a const struct and want to set some member pointers to NULL if I'm deleting it.
That's the once time I need write access...
itsmanjeet
I had written a function which take (library name, function name, arguments), and then use dlopen to get functions pointer from library, arguments are vector of boost::variant for the library function, and as these are c function i need to pass arguments as args list
itsmanjeet
no issue in shift to array offcourse, but i have the study about variadic templates, never used
itsmanjeet
any guide or refrences of procedure
MAMOHT
Need help writing a C / C ++ program. Naturally for a fee. Who is willing to help write to me.
Nameful
Mar!o
Thanks!
itsmanjeet
Oh thanks, that's exactly what i am looking for, no issue in vector to array, that i in my control
YD👺
Hi
YD👺
I want to create a OS Kernel but i do not know how
Intel
hiii guys
Nameful
Asdew
The Little OS Book is a nice start, though. I myself started with it coupled with the information of https://osdev.org/, and while it definitely was not perfect, or even that good, it served me surprisingly well.
Asdew
But you're not going to use your kernel like you're going to use C++.
Asdew
You learn C++ to use it, you make a kernel to have fun and learn.
Asdew
"If your kernel cant work on a 64 bit system which is what most of us use what is the point of learning it?"
What's the point of learning how to make a 64-bit kernel?
"You will have to use Bochs x86 emulators and stuff."
All 64-bit x86 processors can get into 32-bit protected mode, so 32-bit kernels will run.
Asdew
I believe I said "processors," not "computers."
YD👺
I think BIOS better than UEFI
YD👺
Because it Support Dual boot
NXiss7