
C/C++
文章平均质量分 65
mosaic
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C/C++函数指针总结之一:C函数指针
!!!!!!!欢迎转载,请注明本文链接:http://blog.youkuaiyun.com/mosaic/article/details/7199777 !!!!!! 一.函数指针的定义,赋值,(函数)调用看一行C代码:int *func1(int, int);该代码含义很清楚:定义了一个func1函数,有两个整型形参,返回值为int *,即int型指针。再看行C代码:int原创 2012-01-13 21:40:55 · 1775 阅读 · 0 评论 -
Ubuntu上pro*c预编译时找不到stddef.h
今天在ubuntu 11.04上用proc预编译一个pc文件的时候刷刷地出了几屏错误信息,最前面的部分如下:Pro*C/C++: Release 11.2.0.1.0 - Production on Thu Mar 15 22:07:26 2012Copyright (c) 1982, 2009, Oracle and/or its affiliates. All right原创 2012-03-15 20:04:51 · 10291 阅读 · 0 评论 -
g++编译错误:expected unqualified-id before ‘using’
今天写了一个occi的C++程序,结果一编译就出了个莫名其妙的错误。 信息如下:g++ -c TDBPro.cpp -I/u01/oracle/rdbms/public -I./TDBPro.cpp:3: 错误:expected unqualified-id before ‘using’ TDBPro.cpp 的第一行代码为头文件包含,第二行为空行,第三行就为using 命名空间原创 2010-10-29 21:23:00 · 31989 阅读 · 6 评论 -
使用Boost property tree来解析带attribute的xml
boost property tree的5分钟教程虽然简单明了,可惜使用的xml不够典型。今天由于工作上要读取带属性并且有几层嵌套的xml配置文件,因此研究了一下如何使用。下面直接列出测试用的xml文件内容和程序代码。debug_settings.xml,在boost的例子上改得稍微复杂一些。 Finance_Internal原创 2011-10-19 21:06:44 · 8569 阅读 · 2 评论 -
C/C++数组初始化
C/C++里面数组的初始化可以指定每个元素的值,如:int a[3] = {1, 2, 3};在实际应用中,经常会将数值型数组的所有元素都初始化为0,那么就用:int a[3] = {0};今天重新拾起一本C++的书来看才发现自己对第二种情况一直有一个误解:如果在初始化列表里面只给一个值,那么所有元素都初始化为这个值。实际上是只有第一个元素被初始化为指定的值,其余都被初始化为0原创 2012-01-03 19:20:22 · 1189 阅读 · 0 评论 -
c-tree数据库(c-treeACE)(8):开发篇之二:简单封装c-tree SQL API
在一个项目或者一个产品涉及到多种数据库的情况下,对各种数据库的API进行抽象封装出一个统一的接口,是一个比较好的方式。这里简单的给出一个封装了c-tree SQL API功能的C++库。主要包括4个类:Environment, Connection, Statement, ResultSet. 以下贴出代码: /* * Environment.hpp */#ifnde原创 2011-01-06 20:52:00 · 1706 阅读 · 0 评论 -
A case for coredump under HP-UX B.11.31 U ia64 + oracle 10.2
A pro*c based application can run correctly under AIX and either oracle9i or oracle 10g, and it is also ok for HPUX and oracle9i. But it always core dump when connecting to the database for HPUX and原创 2008-12-11 18:52:00 · 3999 阅读 · 0 评论 -
An issue of errno in a multi-threaded environment under AIX
A problem about errno in a multi-threaded environment under AIX was reported in our product in these days.The program works well before the introduction of a lower-level component which is mutil原创 2009-02-03 16:24:00 · 1866 阅读 · 0 评论 -
UnixODBC installation under IBM AIX
Download unixODBC-2.2.14.tar.gz from http://www.unixodbc.org/ first.Accoring to introduction in the document of http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0402walker/index原创 2009-03-19 13:09:00 · 3330 阅读 · 3 评论 -
C/C++函数指针总结之二:C函数指针的使用.
<!--@page {margin:2cm}p {margin-bottom:0.21cm}-->上一篇总结了函数指针的定义、赋值等基本知识。那么函数指针用在哪儿呢?如果象上一篇的例子里面那样用,纯粹就是脱裤子放p,直接使用函数好了。函数指针最经典的应用就是回调了,就是将一个函数1指针作为参数传给另外一个函数2,在这个函数2中就可以用传入的函数指针来调用那个函数原创 2012-01-16 20:38:28 · 1551 阅读 · 0 评论 -
使用boost::property_tree生成带attribute的xml
使用boost::property_tree生成带attribute的xml原创 2014-09-04 08:07:12 · 4135 阅读 · 0 评论