Roxifλsz 🇱🇹
Please help
/ban homework
Anonymous
Please help
/ban homework
Anonymous
/ban homework
/report homework
వ్లాదమిర్ పుతిన్
/ban homework
how to report?
Roxifλsz 🇱🇹
how to report?
/report should work
Roxifλsz 🇱🇹
/report homework
Of course it won't report an admin like this
వ్లాదమిర్ పుతిన్
వ్లాదమిర్ పుతిన్
వ్లాదమిర్ పుతిన్
thanks
Roxifλsz 🇱🇹
Sure, just don't misuse the report
వ్లాదమిర్ పుతిన్
Vlad
Why?
cause it annoys the hell out of admins I guess :P
Roxifλsz 🇱🇹
Why?
It's just the way how rose bot is made ¯\_(ツ)_/¯
Roxifλsz 🇱🇹
¯\_(ツ)_/¯ this????
Google keyboard shortcut
Roxifλsz 🇱🇹
There's also @ShrugBot
Roxifλsz 🇱🇹
¯\_(ツ)_/¯
Anonymous
Wow....
Anonymous
Google keyboard shortcut
Can u also teach me...sir plsss...
Anonymous
Wowowow
Vlad
OT buy there you go
Sacred knowledge has been exposed
__
People, a beginner here. Can anyone explain how wrapping around happens when a signed and unsigned ints are added or share a good resource explaining the process?
Anonymous
People, a beginner here. Can anyone explain how wrapping around happens when a signed and unsigned ints are added or share a good resource explaining the process?
unsigned int (assumed 8 bits here) 1111 1111 = 255 + 0000 0001 = 1 ----------------- 1 0000 0000 = 256 but there is no space for the 1 so it is dropped. the answer is 0. a more rigorous way to think about it would be the sum is mod 256'd
Anonymous
for signed int; overflow is undefined behaviour
Vlad
for signed int; overflow is undefined behaviour
Yes it's undefined behavior from the language standard stand point. But it's well defined in the assembly of an architecture you're working with.
Anonymous
Yes it's undefined behavior from the language standard stand point. But it's well defined in the assembly of an architecture you're working with.
yes. but code that exhibits undefined behaviour is ill-formed. a compiler expects that code is well-formed and applies optimisations based on the assumption.
Anonymous
yes
Anonymous
someone hv pthread scheduling and scope related attribute coding practice documents?
Anonymous
I searched alot on Google bt got 2-3 program example on pthread scheduling and scope attribute
Anonymous
please learn C++. C++ is not java
Anonymous
long long int *a = new long long int(test_case); for (int i = 0; i < test_case; i++) { cin >> a[i]; }
Anonymous
these two things made me say that
Anonymous
recommended book - C++ Primer by Lippman, 5th edition (though with C++20 a lot of it will be outdated)
stranger
long long int *a = new long long int(test_case); for (int i = 0; i < test_case; i++) { cin >> a[i]; }
but isn't the work of new to allocate memory, I do it with int all the time. Does it work differently for long long int?
Anonymous
but isn't the work of new to allocate memory, I do it with int all the time. Does it work differently for long long int?
1) you are allocating a long long int and initialising it with an uninitialised variable 2) then you are using the single integer as an array of test_case items 3) you do not have a "delete" corresponding to the "new". no implementation of C++ supports garbage collection. you need to clear memory either manually, or use a class whose constructor allocates memory and destructor frees it (RAII pattern).
Anonymous
like everything about that program is wrong
stranger
like everything about that program is wrong
I would appreciate if you elaborate it a bit more.
Anonymous
I would appreciate if you elaborate it a bit more.
:/ the message above has 3 bullet points explaining what is wrong with the 2 lines i posted before
Anonymous
What software or program you've developed in C++ for useful purposes ?
Coffeholic
Hi Good afternoon... Does anyone knows any c++ 20 books for beginners?
Anonymous
what programmer can I use to run codes on c/c++
Anonymous
I thought you have more to say. My mistake.
things like RAII, manual memory management, usage of arrays are basic stuff, which is why i recommended the book instead.
ㅤ v Амзы факы
Wrong group
Dima
Sure
Dima
stranger
things like RAII, manual memory management, usage of arrays are basic stuff, which is why i recommended the book instead.
Actually i noticed it later that I have not taken input and intialized garbage array. This is because I made some last minute changes. And I agree with your delete concept. But I just didn't consider it important at that point since I was focusing on solving the problems. But even after taking input and intializing correct array and fixing that iterator mistake. The error remains.
Coffeholic
read the spec!
The book name is (spec!)
Coffeholic
Tyvm
Anonymous
Actually i noticed it later that I have not taken input and intialized garbage array. This is because I made some last minute changes. And I agree with your delete concept. But I just didn't consider it important at that point since I was focusing on solving the problems. But even after taking input and intializing correct array and fixing that iterator mistake. The error remains.
> And I agree with your delete concept. But I just didn't consider it important at that point since I was focusing on solving the problems. as i said, when you don't want to deal with manual memory management (which should be the case most of the times), you should use a class with RAII. std::vector<long long> a; decltype(a.size()) test_case; std::cin >> test_case; a.reserve(test_case); while (test_case--) { std::cin >> input; a.push_back(input); }
Anonymous
vector's destructor deallocates memory for you
Never
Hii iam a mechanical engineer But i wish to learn program.. First what iam do
Never
Any book having for basic learning
Aman
https://hastebin.com/oriforegiq.cpp
Aman
i am getting a blank output for above's problem
Aman
for a specific input
Aman
The first test case where your code failed: Input: hqghumeaylnlfdxfircvscxggbwkfnqduxwfnfozvs Its Correct output is: m And Your Code's output is:
Aman
as you can see my code's output is blank
Aman
can anyone pls help me with that
Alion🦁
Elon, ask it your employees😉😂
Pavel
as you can see my code's output is blank
your code doesn't print anything as I can see
Pavel
I mean you need to print your values somehow (e.g. std::cout << "some value\n"; or std::cout << s;)
Anmol
https://hastebin.com/oriforegiq.cpp
From the looks of it, you haven't even tried debugging the code.
Pavel
Why? He is returning fine. There's a syntactical error
Ok, I might have misunderstood the task
Anmol
Here's the mistake
Aman
@Anmol can u pls elaborate it .I mean my compiler is not returning any syntax error.
Anonymous
Hi guys... New to this group
Anonymous
congrats
Welcome 😊😊
Aman
can’t you see
how i can know if my online code editor is not showing any syntax error.