首页 \ 问答 \ 需要一些关于链接列表的帮助;(Need some help with Linked Lists;)

需要一些关于链接列表的帮助;(Need some help with Linked Lists;)

我在理解链表代码中的指针和结构定义时有一个简单的问题。

1)

typedef struct node
{
 struct node* next;
 int val;

}node;

这里如果我在初始化node * head时使用两个“node”; 我指的是哪个节点?

2)这里我在struct中使用了一个int val。 如果我使用void *而不是int那么有什么东西会改变吗?

3)如果我传递给一个函数

reverse(node* head)
{
    node* temp = head; or node* temp = *head;     
    //what is the difference between the two
}

我很抱歉,如果这些是愚蠢的问题,我是c语言的新手。

谢谢和问候,布雷特


I have a simple question in understanding the pointers and struct definitions in the linked list code.

1)

typedef struct node
{
 struct node* next;
 int val;

}node;

here if I use two "node" when i initialize node *head; which node I am referring to?

2) Here I use an int val in the struct. If I use a void* instead of int is there any thing thats going to change ?

3)Also if I pass to a function

reverse(node* head)
{
    node* temp = head; or node* temp = *head;     
    //what is the difference between the two
}

I am sorry if these are silly question I am new to c language.

Thanks & Regards, Brett


原文:https://stackoverflow.com/questions/3432796
更新时间:2021-07-03 09:07

最满意答案

这不应该发生。 我试过你提到的。 请检查链接的href属性,可能是相对路径。

尝试在锚标记中的href属性中提供完整路径( 绝对路径 )。 或者可能有任何重定向规则(htaccess或在php中)阻止它打开弹出窗口上的链接。 谢谢


That should not happen. I tried what you have mentioned. Please check the link's href attributes, may be there is relative path.

Try to provide full path (absolute path) in href attributes in anchor tag. Or there may be any redirection rule (htaccess or in php) that prevents it to open the link on the popup. Thanks

相关问答

更多
  • 显示弹出窗口的代码: var popup:MyPopup = new popup:MyPopup(); popup.addEventListener(CloseEvent.CLOSE, function(evt) { PopUpManager.removePopUp(popup); }); PopUpManager.addPopUp(popup, this, true); 在MyPopup类中,您将有一个用于关闭弹出窗口的按钮。 只需挂钩click事件即可发布“CLOSE”事件:
  • 看起来像我正在使用 getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); 我的错。 FLAG_LAYOUT_NO_LIMITS,删除上下文菜单的限制。 (这是原因,上下文菜单走出屏幕),希望对某人有所帮助 Looks like I was using getWindow().setFlags(WindowManager. ...
  • 告诉我,如果这是你正在寻找...父窗口: