Pavel
If a union contains a non-static data member with a non-trivial default constructor, the default constructor of the union is deleted by default unless a variant member of the union has a default member initializer.
That makes sense. Because in the code above what should happen to the std::string part of the union (should it be constructed by default? If not, then when should it be constructed?)
Pavel
I can't answer to these questions
Anonymous
thx
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ru-naked
olli
Please which is good programming c in linux or window
It does not matter, I use Windows + WSL2
Shahram
Hi
Droningbro
/note
Anonymous
hello, Is there any problems that I want to post a quiz game here about C/C++ programming ?
Shahram
/note
Anonymous
/note
Nils
how do I iterate through a String in C++ keeping track of the index/iterator object?
Alex
save track
Anonymous
Anonymous
no, definitely
You can post
Anonymous
You can post
Done , let rock and roll
Loyalty Haitaki
What did I just click
Anonymous
...
Anonymous
Done , let rock and roll
Make polls with telegram, not bots, please
hdjdjdjjdj
Make polls with telegram, not bots, please
do you mind letting me know why?
Anonymous
Make polls with telegram, not bots, please
There's even a quiz mode in the polls
Anonymous
do you mind letting me know why?
It's more convenient
hdjdjdjjdj
ok
Anonymous
There's even a quiz mode in the polls
I checked about it. But It's not better than current one I used.
Anonymous
I checked about it. But It's not better than current one I used.
It is Because in the one you used only one person can vote
Anonymous
anyway, sorry to bother you guys. I am to looking for some test user to check my side project.
Anonymous
It is Because in the one you used only one person can vote
oh, it is not like what you think. All people can involve to the quizzes contest The reason you only see what you did, because I don't want other people know about your choice :) and great :) you have 4/4 correct on the quizzes contest . Haha
Anonymous
Hey guys! I have a coupling question. Can you help me?
Anonymous
Hi everyone! How do i set the elements of an array to 0 in a single for loop in c programming? Thank u for your help 🙂
hdjdjdjjdj
just assign each element to 0
hdjdjdjjdj
for (int n=0; n < array_length; n++) {array[n]=0;}
hdjdjdjjdj
you can do it without a foor loop as well
hdjdjdjjdj
using memset()
Anonymous
Thank u! 🙂
Anonymous
for(int x = 0; x < 5; x++) { TD.instructions.bytes[x]=0; TD.data.bytes[x]=0; } Is that correct?
ɴꙩᴍᴀᴅ
Should be, yep
Anonymous
Thank u
Spyke
Hello guys am new.
!/usr
https://pastebin.com/gc34uid9
!/usr
https://pastebin.com/gc34uid9
Please help me with this I'm not getting any output
Anonymous
Hello guys am new.
Hello guys i am 18 years old
Anonymous
Spyke
just born?
If u wish. Just born into cpp
Anonymous
Thats sound better :)
Spyke
https://pastebin.com/gc34uid9
What's the issue?
Vusal
Hey guys :)
!/usr
What's the issue?
Not getting any output
Anonymous
Thanks for adding
Ryder
Hello world, I just started learning c why do we declare a function? why not just write and get over with it
Ryder
like py
Dima
like py
don’t ever compare c and py lol
Diego
Functions are blocks of code that can be called repeatedly from anywhere; and to prevent code floating around in between functions and the like, all the code that would normally exist outside of a function is written inside a "Main" function, which is the entry point of the program
Diego
Also a Main function is pretty universal Py just declares it for you
Diego
If you also wonder why we work with pointers and what not is because Py also does all of that work for you; in exchange a potentially big loss of performance If you're not interested in performance and what that responsibility off of your shoulders, higher level languages exist for that sole purpose Well, other purposes too, and C# is pretty close to C++ in terms of performance in a lot of scenarios; but that's not really the point
Ryder
aye aye captain
Anonymous
Hello world, I just started learning c why do we declare a function? why not just write and get over with it
C usually requires a main() function to use as an "entry point". Actually, depending how your OS works it runs a _start routine from a file /usr/lib/crt0 (or similar) which then calls main(). The C compilier uses the same kind of linking for main() as other functions, unless you use fancy linking options and assembly language...
@𝑺𝒐𝒃𝒌𝒂
/findprojects
Anonymous
https://pastebin.com/gc34uid9
This is confusing... It looks like you were trying to print a 2d sub-matrix from a dynamically allocated master matrix. Try slicing out of a constant matrix so there are fewer things to debug! If those arrays/vectors have a length method available use the length method.
Anonymous
/findprojects
Are any of these okay? http://rosettacode.org/wiki/Cuban_primes https://www.cs.princeton.edu/courses/archive/spr17/cos126/assignments/lfsr.html https://codegolf.stackexchange.com/questions/218112/get-the-length-of-a-sumac-sequence
莱姆
/start@MissRose_bot
莱姆
hi
莱姆
frind I want to merge the second code with the first
莱姆
معي 2 كود بلغة السي بلس بلس واحد ل التشفير واحد لفك التشفير اريد دمج الاثنين معاً
🇨🇩
/start@MissRose_bot
莱姆
/start@MissRose_bot
Anonymous
/start@MissRose_bot
Anonymous
is anyone using C/C++ to detect language?
Anonymous
is anyone using C/C++ to detect language?
ex: cld2, textcat I don't know how to use this in C/C++
Anonymous
ex: cld2, textcat I don't know how to use this in C/C++
Do you have to use those packages, would alternatives do? https://github.com/search?l=C%2B%2B&q=language+detection&type=Repositories I wouldn't expect the free alternatives to be as accurate... Some language detection software uses a web API and/or cost money.
Anonymous
Do you have to use those packages, would alternatives do? https://github.com/search?l=C%2B%2B&q=language+detection&type=Repositories I wouldn't expect the free alternatives to be as accurate... Some language detection software uses a web API and/or cost money.
I searched on Github, I don't use them, yeah, API is very good, but the project requires work locally (net work usage). I can't find how to use the open source code in C language
Anonymous
I searched on Github, I don't use them, yeah, API is very good, but the project requires work locally (net work usage). I can't find how to use the open source code in C language
I'm sorry can't help you. https://github.com/google/cld3 The CLDx libraries are intended to run as part of Chromium web browser, and may have bindings to Python. There are no convenient examples of direct usage within other C++ projects. It may be possible but it doesn't look convenient to use, much less build! If it could be done then it would give excellent results however.
Anonymous
If you could use the Python bindings, and pass text to a python interpreter (external process or otherwise) then that may be an option.