我如何将数组元素的地址存储在另一个数组元素中 [英] how can i store address of array elements in an another array element

查看:49
本文介绍了我如何将数组元素的地址存储在另一个数组元素中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试实现B +树。实现中没有规范,所以我使用数组来实现B +树。但是,我遇到的问题是我无法将数组元素的地址存储在另一个数组元素中。它的目的是接触孩子。我要提到的另一件事是b +树的桶大小不是特定的。它将在程序开始时确定。例如,它可以存储4,6或10个数据。不要紧。这是我的代码任何帮助将不胜感激。


i am trying to implement a B+ tree. There is no specification in the implementation so i am using arrays to implement the B+ tree. However, there is a problem that i encountered which is I cannot store the address of an array element in an another array element. it is purpose is reaching the childs. The other thing that i want to mention is that the bucket size of the b+ tree is not specific. It will be determined at the beginning of the program. For example it can store 4,6 or 10 data. it does not matter. Here is my code any help will be appreciated.

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

为了便于阅读,您可以将代码括号放在代码周围吗?并写入编译器生成的错误消息(带行号),以便我们轻松解决您的问题,如果这是语法错误?
Could you please put the code bracket around your code for readability; and write us the error message which compiler produce ( with line number ) to make us easy to solve your problem, if that is a syntax error ?



hi,

但是,遇到的问题是我无法将数组元素的地址存储在另一个数组元素中。

However, there is a problem that i encountered which is I cannot store the address of an array element in an another array element.



我不确定你的陈述是什么意思。当我编译你的代码时(使用GCC版本4.1.2),我得到以下输出:

I''m not sure what you mean by your statement. When I compile your code (using GCC version 4.1.2), I get the following output:

展开 | 选择 | Wrap | 行号



您能否将代码括在代码周围以便于阅读;并写入编译器生成的错误消息(带行号),以便我们轻松解决您的问题,如果这是语法错误?
Could you please put the code bracket around your code for readability; and write us the error message which compiler produce ( with line number ) to make us easy to solve your problem, if that is a syntax error ?



好​​的我会。但是没有错误消息。问题是无法正确获取所需元素的地址。

Ok I will. But there is no error messages. The problem is cannot getting the address of desired element correctly.

展开 | 选择 | Wrap | 行号


这篇关于我如何将数组元素的地址存储在另一个数组元素中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆