## c ++: if a class A has a class B as member variable, what are the pros and cons of A that holds object B against a pointer to object B?

What are the advantages of A, use the stack to assign object B to the use of the heap using pointers? To consider

``````class B {
};

A class {
private:
B b;
};
``````

Where the object `second` It is used by `A`. vs

``````A class {
private:
B * b;
}
``````

What are the advantages of the first versus the second, since class B is used exclusively within class A. In the first case, object B is assigned in the stack, whereas in the latter case object B is assigned in the heap. What are the advantages and disadvantages of each design choice?

## \$ Π (x) ge log log x \$ holds \$ 2 le x e e {{e ^ 3} <5.3 times 10 ^ 8 \$?

The book Theory of Numbers by G H Hardy, et al. test $$π (x) ge log log x$$ for $$x> e ^ {e ^ 3}$$. There is a way to try out that also goes for $$2 le x e e ^ {e ^ 3}$$ otherwise (in the worst case) some valuable source to verify this numerically?

## Audio: the Midi keyboard holds the note after pressing the key.

I've been using a midi keyboard with the third-party Playground Sessions app, and it worked fine. I broke the midi cable that connects my keyboard, and as I replaced it (with the same cable model) every time I play a note on the keyboard, it stays in the application long after I press the key. In addition, the keyboard is no longer registered by the name (Yamaha) on the midi devices in the software; it says "VIEWCON …"

I tried a second new cable with the same problem, so that's not it.

I have removed and reinstalled the driver several times.

I've tried it on a different computer, and with GarageBand. The same problem.

When I connected a sustain pedal (long after the problem arose), pressing the sustain pedal causes the computer to play a note (E on average C, for what it's worth).

I have changed the midi input / output connection.

Any other idea? I'm in El Capitan in one computer and Mojave in another. No difference.