S3C44B0 uart程序库 c文件
/* =========================================================================== */
/* Project: s3c44b0_lib */
/* File: uart.c */
/* Organization: cug-1200525 */
/* Author: yuyongbao */
/* Date: 4/10/2007 */
/* Describe: lib */
/* =========================================================================== */
#include "lib_config.h"
#include "uart.h" /*Declaration of functions*/
#include <stdarg.h>
#include &l
相关文档:
http://c.chinaitlab.com/c/basic/200907/789321.html
词法陷阱:
1 = 不同于==不要在程序中将两者写错,小心。将表达式与常量比较时,可将常量放在左边。
2 &和| 不同于& ......
最近一段时间在研究 Pro*C 遇到了很多初级问题。在 Pro*C 中连接数据库时,我们一般是使用在“tnsnames.ora”中配置好连接,写起来很简单,语法如下:
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :dbname;
/* 这里的 dbname 就是在 ......
C/C++招聘的一些感受和经验
前段时间刚参加了n多公司的C/C++软件工程师的面试,有国企,外企,私企(moto,飞思卡尔,港湾,中国卫星XXX(这个牛))等等等等。感受感想颇多,近日终于空闲,在此表述一下。
本人基本条件:3年开发经验,2year+ Windows development experence,1year+ Linux experence. 熟悉C,C++,MFC/ ......
1、为了调用宏时能得到正确结果,在宏体中建议对宏的每个参数用括号括起来,并且当宏体是一个表达式时整个宏体也用括号括起来。
/* c1.c:将两个数相乘 */
#define product(x,y) ((x)*(y))
#include <stdio.h>
int main(){
int a=1,b=2,c=3,d=4,x=0;
x=product(a+3,b)+product(c,d); / ......
assert
函数名: assert
功 能: 测试一个条件并可能使程序终止
用 法: void assert(int test);
程序例:
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
struct ITEM {
int&n ......