PRO*C编程中出现的错误
安装完Oracle后,使用PRO*C编译.pc文件,出现以下错误
proc: error while loading shared libraries: libclntsh.so.11.1:
cannot open shared object file: No such file or directory
解决方法:
在/etc/profile中添加
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib;
export LD_LIBRARY_PATH
然后可以用source /etc/profile 生效一下
若还是出现该错误,则在/u01/oracle.bash_profile中也做相同修改
reboot后,成功编译,.pc生成.c文件。
相关文档:
操作函数,所在函数库为string.h、mem.h
mem…操作存贮数组
void *memccpy(void *destin,void *source,unsigned char ch,unsigned n)
void *memchr(void *s,char ch,unsigned n)
void *memcmp(void *s1,void *s2,unsigned n)
int memicmp(void *s1,void *s2,unsigned n)
void *memmove(void *destin ......
C输出格式总结 收藏
C输出格式总结
1 一般格式
printf(格式控制,输出表列)
例如:printf("i=%d,ch=%c\n",i,ch);
说明:
(1)“格式控制”是用双撇号括起来的字符串,也称“转换控制字符串”,它包括两种信息:
&nbs ......
1.本章思维导图:
Example1:
char
*strcpy(char *target, const char *source) {
char *t = target;
// Copy the contents of source into target.
while(*source) *target++ = *source++;
// Null-terminate the
target.
*ta ......
1.引言
本文的写作目的并不在于提供C/C++程序员求职面试指导,而旨在从技术上分析面试题的内涵。文中的大多数面试题来自各大论坛,部分试题解答也参考了网友的意见。
许多面试题看似简单,却需要深厚的基本功才能给出完美的解答。企业要求面试者写一个最简单的strcpy函数都可看出面试者在技术上究竟达到了怎样的 ......
用单引号引起的一个字符实际上代表一个整数,整数值对应于改字符在编译器采用的字符集中的序列值。
用双引号引起的字符串,代表的是一个指向无名数组起始字符的指针,该数组被双引号之间的字符以及一个额外的二进制值为零的字符'\0'初始化。
printf("Hello world\n");
与
char hello[] = {'H', 'e', 'l', 'l', 'o', ' ' ......