Chinaunix首页 | 论坛 | 博客
  • 博客访问: 426528
  • 博文数量: 126
  • 博客积分: 35
  • 博客等级: 民兵
  • 技术积分: 1262
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-19 16:39
文章分类

全部博文(126)

文章存档

2017年(2)

2016年(20)

2015年(64)

2014年(24)

2013年(16)

我的朋友

分类: C/C++

2013-11-26 15:50:57

2013年11月26日
1、
错误在嵌套模板实参列表中应当使用 ‘> >’ 而非 ‘>>
代码:typedef map> map_u64_pu64;
更正:typedef map< Uint64, pair > map_u64_pu64;
map后面的一对尖括号里可以有空格。在上面的例子里,pair的>和map的>之间应该有空格。
2、
错误:友元声明没有指定类或函数名
错误:声明友元时必须使用 class 关键字
代码:friend Singleton;
更正:friend class Singleton;
3、(笔误。。。)
错误:对成员 ‘get_supid’ 的请求出现在 ‘Singleton::Instance [with T = CMapPartInfo]’ 中,而后者具有非类类型 ‘CMapPartInfo& ()()’
代码:bRet = CMapPartInfo::Instance.get_supid(data.PartID, FatherPartID);
更正:bRet = CMapPartInfo::Instance().get_supid(data.PartID, FatherPartID);
少了个()!
4、(低级。。。)
错误:不能将 ‘bool’ 转换为 ‘char*’,在 assignment 中
代码:while(p=strrchr(id_list,',') != NULL)
更正:while((p=strrchr(id_list,',')) != NULL)
优先级的问题,!=优先级比=高
5、编译pc文件时报错:
Syntax error at line 1443, column 5, file src/OperDB.pc:
Error at line 1443, column 5 in file src/OperDB.pc
    while ( (nIndex = GetConn(&ctx))<0 )/*取出可以用的数据库连接句柄*/
....1
PCC-S-02201, Encountered the symbol "while" when expecting one of the following:
   auto, char, const, double, enum, extern, float, int, long,
   ulong_varchar, OCIBFileLocator OCIBlobLocator,
   OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
   OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
   short, signed, sql_context, sql_cursor, static, struct,
   typedef, union, unsigned, utext, uvarchar, varchar, void,
   volatile, a typedef name, a precompiled header, exec oracle,
   exec oracle begin, exec, exec sql, exec sql begin,
   exec sql end, exec sql type, exec sql var, exec sql include,
错误原因:仅使用了EXEC SQL BEGIN DECLARE SECTION;,未使用EXEC SQL   END DECLARE SECTION;与之相匹配。
6、

  1. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_pair.h: In instantiation of ‘std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > >:
  2. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:135: instantiated from ‘std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > > >
  3. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:1264: instantiated from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree_node<_Val>*) [with _Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Val = std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > >, _KeyOfValue = std::_Select1st<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > > >, _Compare = std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, _Alloc = std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > > >]
  4. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:578: instantiated from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Val = std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > >, _KeyOfValue = std::_Select1st<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > > >, _Compare = std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, _Alloc = std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<long long unsigned int, long long unsigned int, std::less<long long unsigned int>, std::allocator<std::pair<const long long unsigned int, long long unsigned int> > > > >]
  5. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_map.h:93: instantiated from here
  6. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_pair.h:73: 错误:‘std::pair<_T1, _T2>::first’ has incomplete type
  7. /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/strin**d.h:56: 错误:declaration of ‘const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >
  8. make: *** [src/CHashMonitorResult.o] 错误 1
这个错误看上去很诡异,其实很简单,是头文件包含的问题,没有包含相关的头文件!直接的或者间接的,不知道到底要不要包含就包含上,一般情况下多了总比少了好。

2013年12月3日
150903|ERROR_LEVEL|ORA-01400: cannot insert NULL into ("MONITOR"."MONITOR_DEAL_DETAILS"."
150903|ERROR_LEVEL|insert into send_sms_list err,sqlca.sqlcode=-1400
数据库操作失败,有3个字段忘记插入了。

阅读(2061) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~