Skip to content

Instantly share code, notes, and snippets.

View fortheday's full-sized avatar
🤩

magicpotato fortheday

🤩
View GitHub Profile
unsigned char chVal = 1; // ch로 하면 CountHigh와 겹치므로 주의.
__asm ror chVal, 1; Rotate Right
for (unsigned char bitMask = 1 << 7; 0 < bitMask ; bitMask >>= 1)
_putch(chVal & bitMask ? '1' : '0');
class Program
{
const string strLine = "----------------------------------------";
#region Credentials
const string _customerKey = "";
const string _customerSecret = "";
const string _userAccessToken = "";
const string _userAccessSecret = "";
#endregion
int main(int argc, char * const argv[], char * const envp[])
{
while (*envp)
cout << *(envp++) << endl;
return 0;
}

https://en.wikipedia.org/wiki/Precompiled_header

The AFX in stdafx.h stands for Application Framework eXtensions. AFX was the original abbreviation for the Microsoft Foundation Classes (MFC). While the name stdafx.h is used by default, projects may specify an alternative name.

namespace Level0
{
namespace Level1
{
int e_Year = 2018;
}
inline namespace Group1
{
int e_Month = 1;
using byte = unsigned char; // typedef unsigned char byte;
byte bByte = 0xFF;
int x = 2;
constexpr int GetDays() { return 2018 * 365; }
constexpr int todayDays1 = GetDays() * 1; // OK
constexpr int todayDays2 = GetDays() * x; // CompileTime Error
const int todayDays = GetDays() * x; // OK, Runtime initialize
thread_local int tls_ThreadID;
__declspec(thread) int tls_ThreadID_Old;
unsigned char b = 0b1010; // 10
int i = 1'000'000;
enum class EDay { Mon, Tue, Web, Thu, Fri, Sat, Sun };
EDay day = EDay::Mon;