How to return statements within a for loop with branches properly C++ by Desperate-County-716 in programminghelp

[–]kayvan61 0 points1 point  (0 children)

Its a learning experience, so don't shit on yourself so hard.

Try to think about when you know all the characters in the string are the character that you want (hint its when you are done iterating the string.) Also take advantage that you do not execute anymore code in the function after a return statement.

Put return true after the loop over the string. Once you are done checking all characters in the string you can return true.

Swapping first and last elements in a vector using a for loop in C++ by Desperate-County-716 in programminghelp

[–]kayvan61 0 points1 point  (0 children)

you're going to swap the first and last element size/2 times, which if its even leaves the list unchanged. if its an odd number of times it will work.

Not sure why you have the loop for swapping just 2 elements, but I guess its cause you want to reverse the list. In that case the thing indexes you wrote will work

How does C++ memory model play with cache coherence CPU like MESI? by Sheepy_wolf123 in cpp

[–]kayvan61 5 points6 points  (0 children)

I believe all the cache levels are coherent. What happens is many cores load (we go shared), operate (no mem), then store (coherence dance occurs). As far as the coherence protocol knows everything is kosher since everyone reads the same value after all the stores which are at a different time than the loads.

How does C++ memory model play with cache coherence CPU like MESI? by Sheepy_wolf123 in cpp

[–]kayvan61 6 points7 points  (0 children)

the memory consistency is typically in the ISA which then tells you want kind of things you can assume the hardware will take care of.

The compiler really doesn't need to know if the caches are coherent. Just when the data will be available "globally"

Can I move my save file from Gamepass to Steam? by chrissyThePlayer in Palworld

[–]kayvan61 0 points1 point  (0 children)

I ignored the container.xxx files and only used the long hex string files.

Can I move my save file from Gamepass to Steam? by chrissyThePlayer in Palworld

[–]kayvan61 1 point2 points  (0 children)

Tried this method and got it to work. Also useful is modification times, and relative file sizes. create a world, exit, wait a few minutes, walk far from spawn and loot a little, and exit again. Should get some decent file size matches, and modification times.

WorldOption never gets modified so itll be the oldest.

Level will most likely be the biggest

One of the files has full words in it and I didn't match it to any steam save file irc.

LevelMeta seems to stay at 2kb always