You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
AugFJTan
Programmer, creative writer and mechatronics engineer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basic concept of Git as a distributed version control system
Setting up Git
# You only need to run username and e-mail config once on your computer
git config --global user.name "your-name"
git config --global user.email "[email protected]"
How to write portable C code across different Windows versions
Background
MinGW is not really a well suited environment for C programming, but if your university course requires you to use it, then by all means ensure that you use it efficiently without letting it get in your way. Usually, MinGW comes with a (rather lousy) Windows port of the GNU Compiler Collection (GCC). Some IDEs use GCC via MinGW to invoke the GNU C compiler to compile C code. Here are some tips to ensure that your code is portable across different versions of Windows for your university C programming assignment:
Tip 1: Check the encoding
Unsurprisingly, Microsoft had neglected their command line. For years, the default encoding for the command prompt was Code Page 437. This meant that only a limited character set could be displayed on it. It was not until Windows 10 that the default encoding changed to UTF-8. This presents some portability problems. From experience I can tell you that your lecturer will expect you to use the default settings on a specific version of Windows. To check th