ChinaUnix.net
相关文章推荐:

c 嵌套namespace

我要在solaris下建立一个oracle数据库,并对其数据进行修改和查询,把数据库里的信息在web上表达出来。 可我是第一次做,知道一些SQL语言,可不知道怎么可以用c/c++把它们连接起来,或者用其他的SHELL或PERL也可以。 网上我找到的要么是关于oracle DBA的资料,要么就是单独的SQL或单独的c/c++、SHELL、PERL,就是没有说怎么用这些外围的高级语言来开发oracle。各位大侠能否给我提些建议,或有什么好文章,或有什么好书? 项目在即,...

by tianly - C/C++ - 2003-10-22 21:37:48 阅读(3176) 回复(6)

相关讨论

今天在看到inlucd/sys/cdefs.h中发现有这样两个宏 # define __BEGIN_NAMESPAcE_STD namespace std { # define __END_NAMESPAcE_STD } 弱弱的问一句,c语言中有namespace吗?

by zxh9813 - C/C++ - 2008-05-09 13:39:42 阅读(4262) 回复(2)

TIcPP中的解释是: Each set of c++ definitions in a library or program is “wrapped” in a namespace, and if some other definition has an identical name, but is in a different namespace, then there is no collision. 但总觉得不够具体,如何自己创建一个namespace? 很繁琐吗? 创建名称空间是否有关键字,还是在编译的时候加上特殊参数?

by user2003 - C/C++ - 2007-02-05 21:17:47 阅读(2163) 回复(1)

#include ; using namespace std; int main (int argc, char *argv[]) { cout << "Hello World!" << endl; cout << "Press ENTER to continue..." << endl; cin.get(); return 0; } 如上hello程序,为什么没有using namespace std;编译就说cout没定义等一堆错误呢?有他就行,到底这句话起什么作用?编译器看到这句话做了什么事情,我想知道,那位可以解惑一下,thks!

by li2002 - C/C++ - 2003-07-03 22:24:20 阅读(1562) 回复(8)

嵌套函数在c标准中合法吗? 那c++ 又如何? void f(int i, int j) { void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } swap(&i,&j); } 谢谢

by shihyu - C/C++ - 2007-07-01 16:20:54 阅读(2427) 回复(11)

代码如下: //nest.h class nest { public: nest(int x=10,int y=0):m(y) { ;} void display(); class hen { int b; public: hen(int y = 0) { b = y;} void display(); }m; }; 这是一种方式,我还记得有一种在类外定义的方式,怎么做的?

by vaqeteart - C/C++ - 2007-05-17 17:23:23 阅读(3150) 回复(3)

数据库是SYSBASE,如何实现定义游标,打开游标,取数据,关游标这几步?

by leon_leon - C/C++ - 2005-06-14 11:35:34 阅读(1089) 回复(1)

程序代码如下: // ********************************************************************** // // copyright (c) 2003-2005 Zeroc, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // IcE_LIcENSE file included in this distribution. // // ********************************************************************** #include ce/Ice.h>; #include ; ...

by sky_terry - C/C++ - 2005-04-20 12:46:32 阅读(1064) 回复(2)

我有如下程序,省略了不必要的语句: [code] 1 EXEc SQL declare cur1 ... 2 EXEc SQL open cur1 ... 3 for( ;; ){ 4 EXEc SQL fetch cur1 ... 5 EXEc SQL declare cur2 ... 6 EXEc SQL open cur2 ... 7 for( ;; ){ 8 EXEc SQL fetch cur2 ... 9 ... 10 update ..... 11 ... 12 EXEc SQL commit work;...

by bjf - Oracle - 2004-11-29 11:10:50 阅读(1325) 回复(1)

两个互相包含对方的结构如何通过编译?? 代码如下: struct A { struct B * b; } struct B { struct A * a; } 这段代码如何编译通过,当预编译struct A时找不到struct B。 假如把struct B放前面,预编译时又找不到struct A。 有没有办法让这些互相嵌套的结构编译通过

by stvsoft - C/C++ - 2004-11-14 11:43:31 阅读(3231) 回复(9)

我同时使用两个第四类动态sql,游标名都不一样,但第二个动态sql运行完成后,前一个再FETcH游标时出现-501错(游标未打开)。 急切盼望高手帮忙解决该问题,不胜感激!

by peachlee - DB2 - 2004-01-10 16:22:17 阅读(1202) 回复(1)