简体   繁体   English

具有C编程语言的RAM浏览器

[英]RAM browser with C programming language

I want to browse a part of the RAM . 我要浏览RAM的一部分。 I tried with this code: 我尝试使用以下代码:

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

#define MIN ((volatile unsigned char*)0x00000000)
#define MAX ((volatile unsigned char*)0x0000ffff)


main()
{
    volatile char* c;
    for (c=MIN; c<MAX;c++) printf("c[%p]= %c\n",c,*c);
}

However the compiler display this message: 但是,编译器显示以下消息:

warning: comparison of distinct pointer types lacks a cast. 警告:不同指针类型的比较缺少强制转换。

How I can resolve this problem? 我该如何解决这个问题?

c should have the same type as MIM/MAX : volatile unsigned char* c; c应该与MIM/MAX具有相同的类型: volatile unsigned char* c; .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM