Anonymous
Do you not know?
Anonymous
Why does if (a,b,...) exist in c++? It seems so useless
Its evaluates both expressions, but only uses the result of the last.
Anonymous
I thought you guys knew c++
Anonymous
Yes shelly
Anonymous
But why does that exist?
Anonymous
So whats the problem?
Anonymous
It seems so useless
Anonymous
Is their any applications with that?
Mat
My bad
Anonymous
Not many. It's only used when the first expression has a side effect
Anonymous
Not many. It's only used when the first expression has a side effect
Ok so like when the first expression mighr change the one to the right
Anonymous
Makes sense
Anonymous
It can also be used in other stuff, like for loops. for(int i = 0, int j = 0; .... ; ++i, —j) ...;
Anonymous
There this operator is maybe more useful
Nicola
I have to implement this program
Nicola
I have already created an exchange function for the second carrier now I have a problem with the association
Nicola
void randomArray(int v[],int DIM){ for(int i=0;i<DIM;i++){ v[i]=i; } cout<<endl<<"V PRE-SHUFFLE"<<endl; for(int i=0;i<DIM;i++){ cout<<"-"<<v[i]; } for (int i=DIM-1;i>0;i--) { //SHUFFLE FISHER-YATES int j = rand()%(i); swapInt(&v[i], &v[j]); } cout<<endl<<"V SHUFFLE"<<endl; for(int i=0;i<DIM;i++){ cout<<"-"<<v[i]; } }
Nicola
int vrand[DIM/4]; randomArray(vrand,16); for(int i=0;i<DIM/4;i++){ int num=v1[i]; v1[i]=vrand[num]; }
Pavel
Can you suggest some good articles, books or videos about optimization (cache-friendly, data-driven development)?
Nicola
My array takes totally random values😂😂😂😂
Robin
Hello
Nomid Íkorni-Sciurus
Hello!
Luigi
Guys how can I launch the command line "grep -oh "[a,e,i,o,u]" file.txt |wc -w" in C with the execlp()?
Anonymous
I takes a string as a parameter which it executes it in the command line
Anonymous
And it return the status code of the command that was ran
Nomid Íkorni-Sciurus
I have a question about libcurl. The documentation is a bit confused about the parameters size_t size, size_t nitems of CURLOPT_READFUNCTION. Could you explain me what do they represent?
Anonymous
Oke, thankyou
Anonymous
Hi
Anonymous
I,m new in this group
Anonymous
Please anybody tells me about the basic of c language
Anonymous
I want to learn the c language
Anonymous
Thanks to
Anonymous
Thanks
A
Amin
AbG
Please allow me to chat
Dima
lol
Nicola
sorry guys for the disturb ,
Nicola
I must write a code for searching a value in the array
Nicola
in this mode
Nicola
In questo modo
Nicola
And I think this code
Dima
wtf is going on with these weird algorithms on a paper
Nicola
int searchIndex(int v[],int vrand[],int DIM){ for(int i=0;i<DIM;i++){ cout<<"-"<<v[i]; //print array v1 } cout<<endl<<endl; for(int i=0;i<16;i++){ cout<<"-"<<vrand[i]; //print array vrand } for(int i=0;i<DIM;i++){ for(int j=0;i<16;i++){ if(v[i]==vrand[j]){ return j; } } } return -1; }
Nicola
Why?
klimi
To find it
klimi
Compare each element in an array
Nicola
I have a problem
Nicola
the first element of the vrand vector is added to my first array
klimi
I have a problem
I'm sure you do
Talula
the first element of the vrand vector is added to my first array
The thing you're doing is easy and you're doing it right by making sure you're doing on paper first but a little logical thought on it and you'll get it right.
correctmaninwrongplace
Does somone have some good website where i can find a good explanation of translation schemes in C(topic related to parsers and lexers)
Nicola
is there a method that converts a string 1011010101 .. into the corresponding Ascii table value (such as "c")?
BinaryByter
use strtol and then cast the into to a char
correctmaninwrongplace
strtol and cast could work? edit:i think that if you asign strtol to a char you dont need to cast
Anonymous
Define a class sports having sno,sname,fees required function and write a menu driven program to append records in a file and delte records of a give sno
Anonymous
please help me with this^
Nicola
use strtol and then cast the into to a char
"011000110110000101110100" - this string is "cat", how to convert ?
Anonymous
"011000110110000101110100" - this string is "cat", how to convert ?
char *bindat = "011000110110000101110100"; char c = strtol(bindat, 0, 2); printf("%s = %c = %d = 0x%.2X\n", bindata, c, c, c);
Dima
do it
Dima
you can do it
Anonymous
this is easy
any link for the solution?
Dima
no, just start writing it
Dima
that’s all
Anonymous
Sid Sun
Hey guys, I plan on creating a C program which: listens at a port and is sent a request with a text field (obtained from a cookie) (HTTP request, i guess; i don't know a lot about networks) does some stuff with that text and if there is no text field, it must send a text to the sender which is their cookie data from the next time onward (HTTP, i think..) So i should learn working with sockets, right? or is there something else?
Dima
http & sockets
Anonymous
^
Sid Sun
http & sockets
in that particular order?
Dima
I don’t think so
Dima
both