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
auto usHi = *(WORD *)"Hi"; |
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
// C++Builder code | |
struct sockaddr_in addr; | |
SOCKET s; | |
int i; | |
memset(&addr, NULL, sizeof(struct sockaddr)); | |
addr.sin_family = AF_INET; | |
addr.sin_addr.s_addr = INADDR_ANY; | |
addr.sin_port = htons(0); |
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
// 기본형 | |
#include <shellapi.h> | |
#include <shlobj.h> | |
ShellExecute(Handle, "open", "http://magicpotato.com/p", NULL, NULL, SW_SHOWDEFAULT); | |
// [용주] 음...저건 이미 띄어진 익스플로어창이 있다면 거기서 뜨는 문제가 있고 무조건 익스플로어 새창을 띄어서 하고 싶다면 요론식으로.... | |
{ | |
ShellExecute(NULL, "open", "IEXPLORE.EXE", "http://magicpotato.com/p", NULL, SW_SHOW); |
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
// (WindowsInternet + VCL + MP_LIB 사용) | |
//--------------------------------------------------------------------------- | |
#include <vcl.h> | |
#include <wininet.h> | |
#include <stdio.h> | |
#include "mp_File.h" | |
#include "MainForm.h" | |
#pragma comment (lib, "wininet.lib") | |
//--------------------------------------------------------------------------- | |
#pragma resource "*.dfm" |
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
char buf[1024]; | |
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, buf, 1024, NULL); | |
MessageBox(NULL, buf, NULL, MB_OK); |
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
printf("%zu %llu", sizeof(int *), (unsigned int)(((int *)0) + 2)); |
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
using namespace std; | |
void procArray(int intArr[]) | |
{ | |
} | |
void TestMain() | |
{ | |
int intArr[] = { 1, 2, 3 }; | |
procArray(intArr); |
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
#define V(code) puts(#code); code; | |
V(int x = 3); | |
V(x = 4); | |
V(std::cout << x << std::endl); |
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
#define DECL_STR(head, name) char *psz##head##_##name = #name | |
DECL_STR(Product, Potato); | |
DECL_STR(Product, Apple); | |
pszProduct_Apple; | |
pszProduct_Potato; |
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
static void localFunc();// scope is same file | |
static int g_localInt; // scope is same file |
OlderNewer