Anonymous
Anonymous
why do i sometimes get
START MAIN EXECUTOR
EXECUTION THREAD IS RUNNING
FINISH MAIN EXECUTOR
JOINING
waiting for EXIT pid 1075525
JOINED
and sometimes get
START MAIN EXECUTOR
EXECUTION THREAD IS RUNNING
FINISH MAIN EXECUTOR
JOINING
waiting for EXIT pid 1075526
wait_for_state (pid 1075523): expected state: EXITED, got state: CONTINUE
Anonymous
or rather, why does the CONTINUE state get caught only sometimes, and not every time?
Anonymous
as both init tests call terminate() explicitly and in the destructor
void ExecutionManager::terminate() {
if (running.load()) {
running = false;
for (ThreadCreationInfo * t : threads) {
Thread * t_ = &t->thread;
if (t_ != this_thread) {
if (t_->suspend) continueThread(t_);
joinThread(t_);
delete t;
}
}
joinThread(this_thread);
this_thread = nullptr;
threads.clear();
}
}
Ammar
opencore
#ide
opencore
#awesomeness
Sardi
Does anyone know what is the difference between IF / ELSE and SWITCH? When is it best to use each one?
Anonymous
ok i think i got my thread manager stable :)
Anonymous
if constexpr (C++17) however is computed at compile time instead of runtime
Sardi
Anonymous
Sardi
yes
But at compile or run time?
Anonymous
https://en.cppreference.com/w/cpp/language/switch
Anonymous
Sardi
Thankss
Anonymous
https://www.eventhelix.com/embedded/c-to-assembly-translation/
this may help
Anonymous
Anonymous
Hamza
Who we convert letter into ASCII code
Anonymous
Hamza
Anonymous
https://stackoverflow.com/questions/37241364/difference-between-char-and-int-when-declaring-character/37241654
Anonymous
ok, i can now correctly create and join suspended threads :)
Anonymous
wow, only 415 lines...
Anonymous
my old execution manager is 922 lines and is a mess
Ибраги́м
Using Enum, available in g++-11
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1099r5.html
Ammar
Who we convert letter into ASCII code
Practically, in C, any char is 8-bit integer that contains ASCII code. It is just how you print it.
The print format is %hhd for signed 8 bit and %hhu for unsigned 8 bit. No need to cast anything, unless you use insane library like iostream which implicitly prints 8 bit type as character.
Hariyana Grande
The program:
Given two angles of a triangle, calculate the third angle.
INPUT:
A single line containing the two angles a et b separated by a space.
OUTPUT:
A single line containing the last angle c.
CONSTRAINTS:
1≤a<180
1≤b<180
EXAMPLE:
Input
1 1
Output
178
Hariyana Grande
how do i solve these kind of problems
Anonymous
Hariyana Grande
i searched on youtube but they directly solved it without giving proper explaination
Anonymous
Anonymous
homework huh ?
Prince Of Persia
Prince Of Persia
🤨
Prince Of Persia
I know I know
And you need to someone do your exercise for you😂
Prince Of Persia
1. Open a browser or click on google.com
2. Click on text box
3. Write anything you need
Prince Of Persia
😂👍😅
Prince Of Persia
Go and enjoy
Prince Of Persia
Do you know what is my name?
Prince Of Persia
My name is Abo Izrael
Do you know who is Izrael?
Anonymous
Prince Of Persia
Anonymous
Hey why do companies like Amazon etc use c++ for selecting students? Instead no c++ is used for their own development they use java
Prince Of Persia
Prince Of Persia
Amazon uses C++ in the back-end
Prince Of Persia
https://www.quora.com/Why-do-tech-giants-like-Google-Amazon-and-Facebook-use-C++-for-their-back-end-What-are-the-advantages-of-using-C++-against-other-languages
Prince Of Persia
Because C++ is one of the hardest language for learning
Anonymous
Ohk
Prince Of Persia
And if someone knows C++
He/She can do anything
Prince Of Persia
Prince Of Persia
I said
They use C++
But no completely
Kr. Sunny
It's not about knowing one kango or not... It's about experience guys.
Kr. Sunny
Every lango has it's own beauty.
Prince Of Persia
I said
They use C++
But no completely
If you read the page
You will find
It's not only they use c++, it depends .most of the software driven technology products are written in python ex Dropbox, one of the best thing created has 20million code in python.
Anonymous
😀
Prince Of Persia
Ammar
stranger
Jasur Fozilov 🐳
OnePunchMan
Hello
I know c++ language but dont know how to write applications. Can any one give resources for same.
Example application :: https://github.com/psx95/collaborative-text-editor
Anonymous
Hello everyone, I've a problem with passing a parameter to constructor inside a for loop, can anyone help? C++
Mar!o
Anonymous
let say I've
class Student
{
public:
Student(string Name = "XXXX", double English = 100)
{
this->Name = Name;
this->English = English;
}
private:
string Name;
double English;
};
Anonymous
So when I'm trying to create the list of 5 people by using a for loop, it's showing me an error:
for (int i = 0; i <= 5; i++)
{
cin >> Name;
cin >> English;
Student s[i](Name, English);
}