C 常用功能函数 整理 - C/C++ / C语言
C/C++ code:
/*
TSDK.H
Definitions for Common functions and string functions.
Copyright (c) Tody 2010
All Rights Reserved
*/
#ifndef __TSDK_H__
#define __TSDK_H__
#include <string.h>
#include <time.h>
#include <ctype.h>
#if __STDC__
# define _Cdecl
#else
# define _Cdecl cdecl
#endif
#ifdef DOS
# define SAY(x...) printf(x)
#else
# define SAY(x) printf(x)
#endif
#ifndef MAX
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define FATAL(x) do { \
printf("\n[-] PROGRAM ABORT : %s", x); \
exit(1); \
} while (0)
#define VERSION "1.0.0"
#define true 1
#define false 0
typedef char bool;
/* Function Declare */
bool _Cdecl copy_file (char *scr_file, char *dst_file, int flag);
bool _Cdecl file_exist (char *file);
char *_Cdecl skip_spaces (const char *str);
char *_Cdecl strim (char *p);
int _Cdecl t_random (int a, int b);
bool _Cdecl log_save (char *log_file, char *ErrMsg);
bool _Cdecl is_leap_yaer(int year);
int _Cdecl which_day (int year, int mon, int day);
bool _Cdecl is_little_endian( void );
/*******************************************************************
* Remove leading whitesp
相关问答:
SHIFT加F10与那个键右ctrl边上的那个键功能一样,想屏这个
但不知要怎么写那个组合键!
有没哪个大侠放一段这个的代码或写一段
http://topic.csdn.net/u/20090609/15/7dc9fb70-243f-4070-9cfd-34e48b66e6c6.html
......
在根目录/lib中存放一个log.c,log.h,并用下面的语句:
gcc -c log.c
ar crv liblog.a log.o
编译出一个liblog.a静态库,然后在文件夹:/testfile中创建一个test.c和testc.c,test.c中引用了testc.c中定义的方法 ......
挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
公司开发一个触摸屏程序,我负责的一块,实现这样一个功能,当鼠标点击窗口中图片(一张图分成几部分)的其中一部分时,将这部分图片截取出来,弹出新的窗口,将截取出的图片显示出来。我使用Rectange类控制了返回, ......