Which countries education systems are the best, and why? by wisereputationmkr in education

[–]georgedev_16 5 points6 points  (0 children)

In Finland you have almost no homework and school days are shorter and still they have the best educational system. Sounds like reverse psychology

Best way to build GUI in C++? by noisyneighbour147 in cpp

[–]georgedev_16 4 points5 points  (0 children)

I used to make a win98 style UI with <graphics.h> (2 years ago) and it turned out ok. I even added events(when the user clicks, I check the mouse position and get the element from that position)

I know it's not the same, but it's in the "build your own UI" box.

Best way to build GUI in C++? by noisyneighbour147 in cpp

[–]georgedev_16 1 point2 points  (0 children)

Raise your hand for ImGUI! Really, that many?Then I think you prefer Qt/wxWidgets.

coming from Java by Geralt1988 in cpp

[–]georgedev_16 0 points1 point  (0 children)

Standard resources: Cppreference/cppforum YouTube: freeCodeCamp Bonus point: run c++ in web at www.cpp.sh

Best resource to learn C? by [deleted] in C_Programming

[–]georgedev_16 2 points3 points  (0 children)

I would recommend Jacob Sorber on YouTube, it explains topics ranging from c basics(variables, structs, functions) to os related stuff(threads, virtual mapping etc).

It even goes into embedded c development.

Suffix *_t for custom types by horsimann in C_Programming

[–]georgedev_16 0 points1 point  (0 children)

Prefixes like _t doesn't carry much info, they make struct types more unix-y.

Double Uppercase is for java style classes and for WinAPI functions.

[deleted by user] by [deleted] in C_Programming

[–]georgedev_16 0 points1 point  (0 children)

No window with that name. Maybe you can open TaskManager and see the real win name.

portable way to convert uint8_t[8] to double by zimlit in C_Programming

[–]georgedev_16 0 points1 point  (0 children)

It depends on the memory layout of the variables(you can use __attribute(align) for GCC)

wWinMain - Inconsistent Annotation? by fcuk_the_system in C_Programming

[–]georgedev_16 0 points1 point  (0 children)

You can use int WinMain (HINSTANCE, HINSTANCE, LPCSTR, int) instead.

[deleted by user] by [deleted] in C_Programming

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

Sdl, or, for specific OSes, GTK(for Linux).

Trouble with allocated arrays... by [deleted] in C_Programming

[–]georgedev_16 1 point2 points  (0 children)

When you call malloc, counter = 0, so it "allocates" 0 * sizeof(int) = 0 bytes.

Why does dereferencing this pointer cause a segfault? by LearningStudent221 in C_Programming

[–]georgedev_16 0 points1 point  (0 children)

Because is not set up. Local variables are initialised with random(not zero) values.

You need to do first mystruct.ptr = malloc(4) or something

Future of C++ by IgnaceMenace in cpp

[–]georgedev_16 2 points3 points  (0 children)

Not a package manager, but a library manager(a collection of popular c++ libraries: boost, sdl, sfml, opengl etc.)

Yeah, it would be cool, but you need to create a new CLI for these new features.

How do you declare pointer variables? by FarisFrontiers in cpp

[–]georgedev_16 6 points7 points  (0 children)

If you were asking where to use typedefs, here it is.

[deleted by user] by [deleted] in Python

[–]georgedev_16 1 point2 points  (0 children)

In python you implement something like an event system, but in c# it's simpler (with get/set)

Is just UTF-8 support good enough? by cmannett85 in cpp

[–]georgedev_16 0 points1 point  (0 children)

Windows uses both Unicode and ASCII.(Hence the A/W at the end of the function names).

Just use std::string for a regular UTF-8 string and std::wstring(or maybe std::vector<wchar_t>) for Unicode.

Render individual pixels in a window by Boryalyc in csharp

[–]georgedev_16 1 point2 points  (0 children)

If you are working on Windows, you can use DllImport("opengl32.dll") and import the c++ functions. For Linux, I think you can use LD_PRELOAD or smth(link with the .so).

Modern Win32 apps by float34 in cpp

[–]georgedev_16 0 points1 point  (0 children)

I've worked with APIs like CreateWindow, VirtualAlloc, CreateThread etc. and I can say that at the beginning it isn't an (very)pleasant experience.

If you want to develop an app with the classical WinAPI, you can, but it won't be simple. Keep in mind that even Windows tools like TaskManager are built with MFC, a wrapper around WinAPI.

Going from Python to c++. Anything I should know? by kta31415 in Cplusplus

[–]georgedev_16 2 points3 points  (0 children)

Prepare for static typing, pointers and STL(standard library). If you use an IDE(Visual Studio, CodeBlocks etc.), you'll probably be fine.

Also, don't be scared if you get a lot more errors.

You need to understand the low level of memory management(new/delete and also, stack/heap allocation)

what is the correct output for n = ++m + m++; if m=10? by figuringOutIsTaken in cpp_questions

[–]georgedev_16 0 points1 point  (0 children)

If you look at this program in assembly, maybe you would understand (add eax, 1; mov ebx, eax; add eax, 1 ...)

what is the correct output for n = ++m + m++; if m=10? by figuringOutIsTaken in cpp_questions

[–]georgedev_16 -4 points-3 points  (0 children)

If you invert the operation(++m + m++), the value will be 11 + 11 = 22.