Hermann
otherwise you have to reallocate the array in a smaller memory region, but reallocations are not an efficient process
this is the problem... my mpz size is 1024 but when i conert is, my buffer size is 128/300 about. i dont understand this difference
Hermann
is see this example
Hermann
is see this example
https://stackoverflow.com/questions/6293528/gmp-import-export
Palinuro
this is the problem... my mpz size is 1024 but when i conert is, my buffer size is 128/300 about. i dont understand this difference
wait, what is this buffer about? buffers exist to temporarily store slices of bigger values into smaller ones to make access to big resources easier
Palinuro
https://stackoverflow.com/questions/6293528/gmp-import-export
oh i don't know gmp, let's wait for someone more experienced
Hermann
ok :)
Anonymous
Hi, so this is a Group for programming in C/C++?
Anonymous
if i try to ssh into my virtual machine from local machine, and i get permission denied , even tho its the correct password , how do i fix this ?
Hermann
check your domain
Anonymous
check your domain
i used ip address
Anonymous
also made some edits to sshd_config file
Hermann
trivial question, why (num of digits in base 2 + 7)/8 get space in byte?
Ajay
Let us c is a bad book
Hey Danya, Is that sold in Russia too !!
︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎
Anonymous
Hello everyone, Replacing operator new(size_t sz) works for both new and new[] since the latter calls the former. Replacing operator delete(void* ptr) works for both delete and delete[] in the same way. If I try replacing operator delete(void* ptr, size_t sz), this works only on delete and not delete[]. Fine, the latter does not call the sized version of delete. If I try replacing both delete(void* ptr, size_t sz) and delete[](void* ptr, size_t sz), delete[] does not deallocate. Am I missing something?
Anonymous
Thanks for welcoming me I really appreciate it🙏
Makgato
Hi guys i tried to learn C++ on my own using videos from YouTube still today i understand nothing. Please if there is anyone who have link for YouTube of lectures that teach introduction please forward it 🙏🙏
Makgato
Maybe i will understand it
Anonymous
Oh thanks, I'm pretty sure I've redefined delete(void*, size_t) though
Anonymous
And https://en.cppreference.com/w/cpp/memory/new/operator_delete states under global replacement that 5 and 6 can in fact be replaced.
Anonymous
🤔 I'm missing something
Anonymous
But it still does not work ahah 😂 thank you anyways
Anonymous
Sure
Anonymous
No class though. It's a global definition
Anonymous
One second, I'm on the phone
Anonymous
?
Anonymous
godbolt.org/z/AkLPbD
Anonymous
test2 prints correctly upon deletion, test1 doesn't
Anonymous
Anonymous
Thanks, I missed that it's not specified for arrays of non-class type
Anonymous
Disappointing :/
Anonymous
😅 my bad, I didn't pay attention enough
Anonymous
What is the problem with this one?
Anonymous
Have you written any code?
Anonymous
No one will write code for you
Anonymous
This one can be calculated without a computer
Ivasil
Hi guys I'm from Italy and i'm new with this! I enrolled in a school that programming is the base (specially programming C) Is there any tips for me? Like what program do I have to use or similar? Thank you 😊
Ipsa
Can I get some e books
Ipsa
On programming
Ipsa
Pls
Ivasil
/get cbook
klimi
sure, want me to send links?
Ipsa
Yes
klimi
Yes
https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
Alion🦁
What does mean POSIX?
Anonymous
Anonymous
Why is it so hard to Google?
Alion🦁
Google it
I did. But, what the heck is Portable.....
Alion🦁
Why is it so hard to Google?
No, it is easier than "to feel wisdom to say google it "
Asdew
What does mean POSIX?
I think this StackOverflow answer might be of great help: https://stackoverflow.com/questions/1780599/what-is-the-meaning-of-posix#1780614
Alion🦁
I think this StackOverflow answer might be of great help: https://stackoverflow.com/questions/1780599/what-is-the-meaning-of-posix#1780614
I read it too, can I ask about Standards? Do they mean "If something want to be POSIX OSs they must be responsible for"
Anonymous
@unterumarmung i eventually added two different header files with single_view and dereferencing_single_view (now called repeat_n_owned_view and repeat_n_foreign_view because a redditor mentioned repeat_n_view existed in range-v3 but not in the C++20 standard) https://github.com/chandradeepdey/single_view
Anonymous
I thought I have asked a question here and it disappeared now . How it happened
Anonymous
you’ve got a warning. read the rules
But for what I haven't done anything thing wrong. Everything was in accordance to rule
914
guys
914
how to initialize a string array with same value?
Ivasil
Any app for starting write codes? for C
914
i want initialize string arr[][] with a single space " "
914
without using for loop
Ivasil
is Dev-C++ good for study C?
Dima
No
Ivasil
What software do i have to use?
914
a....simple text editor i guess?
Ivasil
like notepad++?
klimi
is Dev-C++ good for study C?
for the begining... or if you are feeling positive you could try just editor+compiler
klimi
and what about notepad++?
that is text editor
Ivasil
Sorry, for study i mean like writing.. 😅 my bad
klimi
?
creeea
Noob question: Can someone explain to me this output? Why are there three times Job 2? Shouldn't be it only twice? I used google but I don't get it. It is better to interact with someone I guess.
creeea
creeea
creeea
Ah, thank you. But isn't the for loop infinite? Since i = 0 < -1 and it increases i. How does it pass this loop to print ''Job finished''?
creeea
So it doesn't even enter the loop... But why is the first thread so slow that it can't finish befor the second starts&finishs? I mean it should be fast