SeanTYH

u/SeanTYH


r/cpp_questions•

Hi, I am a Java dev learning CPP from a tour of C++. I m currently about 5 chapters in working on a simple project to reinforce fundamentals before I move on to Essential Operations such as copy/move.

I would like to receive some code reviews on an enigma simulator I wrote in my free time

36

r/cpp_questions•

I am trying to comprehend the C++ Primer 5th Edition page 135 where it says:

address-of operator requires an lvalue operand and returns a pointer to its operand as an rvalue.

Now, I know that the address-of operator returns the address of a variable, reading up the [docs](https://learn.microsoft.com/en-us/cpp/cpp/address-of-operator-amp?view=msvc-170) says that what is being returned is actually a pointer to the variable. So for example:

int ivar = 10;
int* p = &ivar;

Can I understand this as:

  1. address-of operator gets the address of ivar and creates a temporary pointer to the variable

  2. temporary pointer is assigned to p which copies over the values of the temporary poi

16


r/HongKong•

“Leung Shui” shops

Questions/ Tips

I have seen quite a few Leung shui shops in HK, but I don’t really know what the health benefits of any of the different drinks. I just usually get the five flower tea (?) because five different flowers surely gives more benefits (unless I am wrong 😑).

What do you usually get at these shops and what health benefits does the drink provide?

111


r/ObsidianMD•

Hello, I just started using Obsidian, and am in the middle of transferring notes from OneNote to Obsidian. In the following picture you can see the rendering of the notes is using the markdown syntax I believe?

​

https://preview.redd.it/yz5o2xx9q8wc1.png?width=793&format=png&auto=webp&s=d92d4396e3c7cbc3e892bc7fceb0aecaa1422133

However just slightly above it, the formatting is still fine.

https://preview.redd.it/9wn0y4wlq8wc1.png?width=827&format=png&auto=webp&s=10f7870d8498d0e00de1a756fda6a3350a82ec8e

Any fixes for this? or is this some sort of built-in functionality to say "no long af notes"?

32



Hi, I am using a windows device, installed WSL2 with Ubuntu-20.04. Previously I had an GitHub repos cloned on to the ubuntu side. While trying to access this with IntelliJ, it is unable to resolve the local repository.

For example, it would be something like \wsl$\Ubuntu-20.04\home\seant.m2\repository, though I attempted to use \home\seant.m2\repository directly. I tried to use either but instead of downloading maven dependencies to the path, it will create a directory with the name of the file path inside my GitHub project so when I run ls, there is a directory “\wsl$\Ubuntu-20.04\home\seant.m2\repository” with all the dependencies inside.

10



r/javahelp•

I m probably only skimming on the basic levels of Java generics and I m looking to improve. I saw something like the following on SO

public interface Version<V extends Version<V>> extends Comparable<V> {
// some code without dependency on parameter V

}

and while the comment from shmosel does explain how it works with a class VersionA implements Version<VersionA> allowing VersionA to be only comparable to itself, I still cant comprehend this.

11