Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lexuanquynh's full-sized avatar
👋
coding ...

Quynh lexuanquynh

👋
coding ...
View GitHub Profile
@lexuanquynh
lexuanquynh / function
Created August 4, 2017 09:05
simple code C
m_oButtonContainView = GigView::create();
m_oButtonContainView->setRect(0, SCREEN_HEIGHT - BUTTON_CONTAINER_HEIGHT, MENUBOOK_WIDTH, BUTTON_CONTAINER_HEIGHT);
m_oButtonContainView->setBackgroundColor(getColor(COLOR_IPOS_BOOKING_BUTTON_BACKGROUND));
m_oMainView->addChild(m_oButtonContainView);
#include <iostream>
int main() {
std::cout << "Hello world 1" << std::endl;
return 0;
}
#include <iostream>
int main() {
char* strHello = "Hello world 2";
std::cout << strHello << std::endl;
return 0;
}
#include <iostream>
int main() {
char strHello[] = {'H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', ' ', '3', '\0'};
std::cout << strHello << std::endl;
return 0;
}
#include <iostream>
int main() {
std::cout << (char)72;
std::cout << (char)101;
std::cout << (char)108;
std::cout << (char)111;
std::cout << (char)32;
std::cout << (char)119;
std::cout << (char)111;
#include <iostream>
void printHelloworld(const char* str) {
std::cout << str << std::endl;
}
int main() {
printHelloworld("Hello world 5 ");
return 0;
#include <iostream>
class Hello {
public:
Hello() {
std::cout << "Hello world 6" << std::endl;
}
};
int main() {
#include <iostream>
//singleton design pattern
class Hello {
private:
Hello() {
std::cout << "Hello world 7" << std::endl;
}
public:
#include <iostream>
#include <string>
class Model;
class View;
class Controller;
//Model - View - Controller Design pattern
using std::string;
@lexuanquynh
lexuanquynh / Makefile
Created August 8, 2017 09:59 — forked from xuhdev/Makefile
Makefile template for shared library
# Makefile template for shared library
CC = gcc # C compiler
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = libtarget.so # target lib
SRCS = main.c src1.c src2.c # source files
OBJS = $(SRCS:.c=.o)