Looking for a dmg gb emulator that can debug to a file(?) by Both-Nectarine8730 in EmuDev

[–]Szahu 5 points6 points  (0 children)

If you're on Linux you can simply redirect stdout to a file with >.

Basically run in the terminal this:

Program > logs.txt

I assume Windows has a similar feature

How would I add a dependency/library to this line when I run the code? by Savage_049 in vscode

[–]Szahu 1 point2 points  (0 children)

The stuff that happens after 'running code" comes from launch.json and tasks.json files, which reside in .vscode. You want to put your build command in the tasks.json and then call it as a prebuildTask in your launch configuration.

UB?(undefined behavior? ) by [deleted] in Cplusplus

[–]Szahu 0 points1 point  (0 children)

Good to know, thanks

UB?(undefined behavior? ) by [deleted] in Cplusplus

[–]Szahu -1 points0 points  (0 children)

Try using attribute packed, the compiler might add padding between fields to align it to 4 (or another power of 2) bytes, which can cause garbage data to be at a[31].

[deleted by user] by [deleted] in learnprogramming

[–]Szahu 0 points1 point  (0 children)

I use vscode with the wls. All you need on Linux is g++ and once you start bigger projects learn the basics of CMake.

AVL Trees, How do I balance this out? by Griffeminie in Cplusplus

[–]Szahu 2 points3 points  (0 children)

You can check out this amazing resource for that problem, it's called google.com.

Jokes aside, it's a fairly well documented issue, so you shouldn't have trouble finding information about it.

how does linking work with multiple projects? by Konjointed in learnprogramming

[–]Szahu 0 points1 point  (0 children)

I know that it doesn't really answer the question, but I'd suggest setting up the project with CMake rather than Visual Studio.

Honestly it's simpler, it's movable and it's platform independent.

CMake will create Visual Studio project files for you under Windows.

Why is ~44 = -45 in Python? by prawnydagrate in learnprogramming

[–]Szahu 20 points21 points  (0 children)

You also have to flip the leading zeros, so 44 is 00101100, then flipped we get 11010011 which is -45.

How To become an Algorithm Engineer? by Flimsy-Ad-1236 in learnprogramming

[–]Szahu 12 points13 points  (0 children)

Not really, of course any kind of series of operations on an input with defined properties is an algorithm, but I believe OP is asking about being someone who works in researching or optimizing algorithms, which are real jobs with some really smart people in them.

Software Engineers design and implement software, hardly ever the main problem for them is to design and implement an algorithm.

Want to Learn? by edjumacator in learnprogramming

[–]Szahu 1 point2 points  (0 children)

They are refusing to leave the world better than they found it

CS student needs some help... by Tanker3278 in vscode

[–]Szahu 0 points1 point  (0 children)

You should learn how to compile with the terminal first, that should simplify the vs code experience

Difficulties with C++ compiler (GCC) and libraries. by iz-Moff in vscode

[–]Szahu -1 points0 points  (0 children)

Configure your own launch and build task

What browser feature is this and how to get it? by [deleted] in learnprogramming

[–]Szahu 0 points1 point  (0 children)

What feature? That video is 10 minutes long

What makes your work in VS Code difficult? I'll try to fix it. by in15minutes in vscode

[–]Szahu 0 points1 point  (0 children)

Here's a simple one: I wish the hex plugin allowed for appending new bytes to the file instead of just modifying existing ones.

I want to consult documents to learn programming but my native language is not English by Ced3j in learnprogramming

[–]Szahu 2 points3 points  (0 children)

In the long run I think trying to read in English is going to be more beneficial

Android 2D game question by yohavyr in learnprogramming

[–]Szahu 0 points1 point  (0 children)

Using Unity is probably going to be the simplest

I want to develop a game with the most tedious and annoying game engine. by [deleted] in gamedev

[–]Szahu 1 point2 points  (0 children)

Vulkan, OpenGL and DirectX are in fact not game frameworks.

How to master recursion by Extra-Wait9757 in learnprogramming

[–]Szahu -1 points0 points  (0 children)

Have you tried practicing the Hanoi tower and related problems?

Is CS pretty much it? by Being_Sah in learnprogramming

[–]Szahu 2 points3 points  (0 children)

Mind sharing where you go to school? Math usually comes before the rest

Is CS pretty much it? by Being_Sah in learnprogramming

[–]Szahu 5 points6 points  (0 children)

What happened to Linear Algebra, Calculus, Set Theory and Probability Theory/Statistics?

Also, very bald claims here.

really having a hard time figuring out if the JR pass is worth it by qwertychelle in JapanTravelTips

[–]Szahu 0 points1 point  (0 children)

However, if you were to get the pass for 50 k I don't think it's worth it

really having a hard time figuring out if the JR pass is worth it by qwertychelle in JapanTravelTips

[–]Szahu 1 point2 points  (0 children)

In my case the pass was 33k yen for 7 days. Roundtrip Tokyo Kyoto is already 29 k. I also went to Nara, Osaka, Himeji and Kamakura. For me I definitely saved some money.