作业问题,求大佬指点

//头文件campus_guide.h
#define Infinity 1000
#define MaxVertexNum 35
#define MAX 40
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
#include
typedef struct arcell
{//边的权值信息
int adj;
}arcell,adjmatrix[MaxVertexNum][MaxVertexNum];
typedef struct vexsinfo
{//定点信息
int position;
char name[32];
char introduction[256];
}vexsinfo;
typedef struct mgraph
{//图结构信息
vexsinfo vexs[MaxVertexNum];
adjmatrix arcs;
int vexnum,arcnum;
}mgraph;
//全局变量
int visited[35];
int d[35];
mgraph campus;
//主程序文件campus_guide.c
#include"campus_guide.h"

因为代码有六百多行,所以下面的省略。我是照着书打的,打完一小段就检查一次。
出现问题是[Error] campus_guide.h: No such file or directory。我用的是Dev-C++5.11。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要实现远程控制小车,可以利用ESP8266模块连接WIFI网络,然后通过发送控制指令来控制小车的运动。 以下是一个简单的示例代码,可以通过向ESP8266发送“forward”、“backward”、“left”、“right”等指令来控制小车的前进、后退、左转、右转等动作: ``` #include <ESP8266WiFi.h> // 替换为你的WIFI名称和密码 const char* ssid = "your_SSID"; const char* password = "your_PASSWORD"; WiFiServer server(80); void setup() { Serial.begin(115200); // 连接WIFI网络 WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println("Connecting to WiFi..."); } // 启动Web服务器 server.begin(); Serial.println("Web server started."); } void loop() { // 等待客户端连接 WiFiClient client = server.available(); if (!client) { return; } // 读取客户端发送的指令 String command = ""; while (client.connected()) { if (client.available()) { char c = client.read(); if (c == '\n') { break; } if (c != '\r') { command += c; } } } Serial.println("Received command: " + command); // 根据指令控制小车 if (command == "forward") { // 前进 } else if (command == "backward") { // 后退 } else if (command == "left") { // 左转 } else if (command == "right") { // 右转 } // 返回响应给客户端 client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println(""); client.println("<html><body><h1>OK</h1></body></html>"); } ``` 在代码中,ESP8266连接到WIFI网络后启动Web服务器,等待客户端连接并发送指令。当收到指令后,根据指令控制小车的运动。最后,返回一个响应给客户端,表示指令已经执行完成。 需要注意的是,上述代码仅仅是一个简单的示例,还需要根据实际情况进行修改和完善。例如,需要添加小车控制代码、异常处理代码等等。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值