# 修改商品信息交互界面

## 当前进度

```c
.---+- include -+- tools -+- color.h
    |           |         +- hint.h
    |           |         +- info.h
    |           | 
    |           +- user  -+- user.h
    |           |
    |           +- good  -+- good.h
    |           |
    |           +- order -+- order.h
    |           |
    |           +- menu  -+- menu.h
    |           |
    |           +- interface -+- interface.h
    |           |
    |           +- config.h
    |
    +-   src   -+- tools -+- color.c
                |         +- hint.c
                |         +- info.c 
                |
                +- data  -+- id.txt
                |         +- user.txt
                |         +- good.txt 
                |         +- order.txt
                |
                +- user  -+- user.c 
                |
                +- good  -+- good.c
                |
                +- order -+- order.c
                |
                +- menu  -+- menu.c
                |
                +- interface -+- mainInterface.c
                |            -+- adminInterface.c
                |            -+- userInterface.c
                |            -+- infoInterface.c
                |            -+- modifyInterface.c
                |            -+- sellerInterface.c
                |            -+- goodInterface.c <---
                |            -+- buyerInterface.c
                |
                +- main.c
```

## 修改商品信息交互界面的实现

```c
#include "interface/interface.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int curGood = -1;

make_modify(name, G, ood)
make_modify(description, G, ood)

static void modify_price() {
    char buffer[MAX_LEN];
    printf("Please input new price: ");
    scanf("%s", buffer);
    check_double
    Good* x = getGood(curGood);
    x->price = m;
    successMessage();
}

static HANDLER handler[] = {modify_name, modify_price, modify_description};
make_interface(G, OOD)
```

{% hint style="success" %}
至此，我们完成了了修改商品信息交互界面的实现。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cui-jiacai.gitbook.io/whale-market/zui-hou-yi-zuo-da-shan-jie-mian/xiu-gai-shang-pin-xin-xi-jiao-hu-jie-mian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
