Captain
Ольга
Aleksandr
Sure
do i need to randomly iterate through or there is a function ready?
Captain
Void
Ольга
Aleksandr
Aquatica
Aleksandr
Why do you need a tuple
Also used simple index = rand() % lst.size(), maybe it's simple if i use random_lst_index+1 for y coord, not using tuple at all, but lst would look like bunch of values
Aleksandr
is it way to do get<0>(random_index_of_lst), get<1>(random_index_of_lst)?
Ольга
Is there any syntax difference when using the pair structure in C++?
pavel
pavel
Pair<T1,T2>
pavel
T1 first, T2 second
Ольга
T1 first, T2 second
Sorry to bother you again, in this code this structure can be called a pair structure or not?
https://onlinegdb.com/iwIfItEAD
pavel
pavel
Btw, better use godbolt
pavel
pair is just template type in standard template library. In modern c++ you can use tuple instead
pavel
And questions about can we call structure pair or not important in context of template programming related with type checking known as "concepts". Not in your case
Ольга
Anonymous
Why there is a
mysql.h no such a file or folder ?
I am on debian.
Anonymous
can somebody help me in assembly language
Anonymous
i am looking for some beginners topics
Pavel
or actually you don't need to return anything from union, you can just keep it void instead
mito
There are a lot of architectures.
Anonymous
mito
Anonymous
mito
yes
There are a lot of articles on the internet that gives basic introduction to these.
Such as this one..
Anonymous
ʙʀʜᴏᴏᴍ ⑇
is there any built in function to find a root of the number...
I don't want a sqrt() or cbrt() ...
I want when the number root of another number
for example y√x , so y is an unknown number
and sorry about my English😁
Ольга
your functions check_number and check don't return anything except EXIT_SUCCESS, is that intended?
I simply need it to determine more first or second, if it is first, then it is not good and it returns EXIT_SUCCESS (if I am not mistaken, it is = 0) and already in the main function, I ask to replace this value with the correct one (that is why I decided to implement it this way ) But I have already fixed it now (it seems to work normally) and now when first>second it returns 1 and if not then 0; I hope it's better
Ольга
Ольга
Pavel
You mean to print it in Union?
No, your Union returns int, but you don't use the returned value anywhere because you passing the struct through the pointer argument.
So you can change it to return void instead.
Faramarz
Binary number of 202 is 11001010; is it overflow? because 202 is positive but the first digit of its Binary number is 1.
Ольга
Vidyan
Hey guys...Can someone help me with a small Project?
Vidyan
😌
PI cadaeibfe
#include <iostream>
using namespace std;
int main()
{
int a;
int b;
cout<<"enter a ";
cin>>a;
cout<<"enter b "
cin>>b;
if(a=b)
{
cout<<a<<"is equal to "<<b;
}
else
{
cout<<a<<"is not equal to "<<b;
}
return 0;
}
Whats is not right?
DaviChan
if (a=b) should be a==b.
DaviChan
Also don't get in the habbit of using entire namespaces globally, please ✌
PI cadaeibfe
DaviChan
Also there is a ; missibg after "enter b"
Beloved
I am having a problem on how to code a binary tree using character strings....
Can you anyone give me a heads up
DaviChan
Whats your problem with it?
DaviChan
Okay, im on phone rn, so the text wraps oddly. Will take a look when on my machine later
Mohamed
how do do make cut Paper on after print in c# ?
DaviChan
but yet again. please only use "using" on what you need. Not globally on an entire namespace... I know its preference, but it really bugs me
DaviChan
im talking about the main function. Especially this part: " struct node* root = newnode(a);
root->left = newnode(c);
root->left->right= newnode(d);
root->right = newnode(b);
root->right->left = newnode(e)"
DaviChan
it looks like a, b, c, d and e are not defined there.
DaviChan
they are not global variables and also not defined in local scope
DaviChan
this looks like a homework problem to me. The point of this is that you think about that yourself. I don't mean to be rude, you can ask specific questions here all the time, but not even trying misses the point of the exercise and won't get you anywhere. Also I know you can do it!
DaviChan
I think what you failed to understand is that a variables name has nothing to do with its content from a compilers point of view. You could as well call a variable banans and neither type nor it's value could be inferred from just the name itself. We often indicate content and type as programmers, for example by hungarian notation, but that is nothing the compiler would automatically pick up on or anything.
Beloved
Chika
Projects for beginners in c++?
Anonymous
@Beloveddee Read the rules on how to post your code.
/
why an uint8_t is always 8 bit if it is only a typedef of a char
/
and if you use char the length may change
Anonymous
char is 1 byte in x86/GCC/Linux
Anonymous
But this may change with different compilers (idk if it is explicitly specified in ISO C standard that sizeof char == 1)
/
Anonymous
Yes that's true
/
Anonymous
Because we have different headers for each arch specifying the correct typedef /* ... */ uint8_t;