在C#里结构体不能用指针typedef struct {
LONG num_tables; /* number of tables */
CHAR **tables; /* table names */
CHAR *where; /* where clause */
} SE_SQL_CONSTRUCT;
LONG SE_sql_construct_alloc
(LONG num_tables,
SE_SQL_CONSTRUCT **constructor);LONG SE_stream_query
(SE_STREAM stream,
SHORT num_columns,
const SE_SQL_CONSTRUCT *construct);SE_SQL_CONSTRUCT sqlc;
long rc;
rc = SE_sql_construct_alloc (1, &sqlc);
sqlc->where = malloc(20);
sqlc->num_tables = 1;
strcpy (sqlc->tables[0], "cities");
strcpy (sqlc->where, "population < 10000");
num_cols = 3;
rc = SE_stream_query (Stream, num_cols, sqlc);先感谢大家帮忙,问题解决马上揭帖,在线等!
LONG num_tables; /* number of tables */
CHAR **tables; /* table names */
CHAR *where; /* where clause */
} SE_SQL_CONSTRUCT;
LONG SE_sql_construct_alloc
(LONG num_tables,
SE_SQL_CONSTRUCT **constructor);LONG SE_stream_query
(SE_STREAM stream,
SHORT num_columns,
const SE_SQL_CONSTRUCT *construct);SE_SQL_CONSTRUCT sqlc;
long rc;
rc = SE_sql_construct_alloc (1, &sqlc);
sqlc->where = malloc(20);
sqlc->num_tables = 1;
strcpy (sqlc->tables[0], "cities");
strcpy (sqlc->where, "population < 10000");
num_cols = 3;
rc = SE_stream_query (Stream, num_cols, sqlc);先感谢大家帮忙,问题解决马上揭帖,在线等!
解决方案 »
- asp.net cms 如何使用 ---------------------帮帮忙!
- 请教大师,如何预防病毒JPG文件上传呢?
- 请问在web中用户需要自定义报表格式,要怎么做?
- 如何通过编程为GridView添加一行
- 请教两个Button 根据button的id不同执行代码不同(用if else判断)如何实现?
- 地址栏显示地址问题
- 关于GetCallbackEventReference回调问题。服务器配置的原因?
- session为空值时回到登陆页,不知道哪里错了??
- 有关Request.UserHostAddress。为什么得到的都是同一个IP地址(DNS的IP)
- 各位大哥,能不能这样做Me.SqlDataAdapter1.Fill(JjbX),x是一个整型变量?
- 莫名其妙的错误,session问题
- 上传图片问题
这里只是定义了一个结构体类型,访问他的成员应该使用sqlc.where语法吧.LONG SE_stream_query
(SE_STREAM stream,
SHORT num_columns,
const SE_SQL_CONSTRUCT *construct);
函数原型是需要一个const SE_SQL_CONSTRUCT *construct,这里好像是指针吧.
可在调用的时候,rc = SE_stream_query (Stream, num_cols, sqlc);却给了一个sqlc,具体的类型.Stream是哪个库里面的类型?
如:char*,可以用string来代替
char**,可以用string[]来代替,或者用ArrayList来代替
rc = SE_sql_construct_alloc (1, &sqlc); &sqlc?
rc = SE_stream_query (Stream, num_cols, sqlc); sqlc?
怎么写呢?
Sql.tables[0] ="D131";编译时错误,
SE_SQL_CONSTRUCT Sql =new SE_SQL_CONSTRUCT();
Sql.tables[0] = "dd";
错误: 无法将“"dd"”分配到“Sql.tables[0]”中