unknown character '0xa1'

laotong 2000-04-28 08:48:00
《计算机世界》1999-34的电脑与生活栏目中《VC++ 6.0 中使用OpenGL》(http://www.ccw.com.cn/99/week/9934/9934b16.asp),我依法录入后,编译出了十个错:error C2018: unknown character '0xa1',都是因为  m_hGLContext =NULL;m_GLPixelIndex = 0;等。两者的声明是:int m_GLPixelIndex; HGLRC m_hGLContext;。
...全文
110 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
halfdream 2000-04-28
  • 打赏
  • 举报
回复
应该是trace所说的原因没错。0xa1一般用于汉字字符的高位字节。
我以前也不小心遇上过这种情况。
trace 2000-04-28
  • 打赏
  • 举报
回复
是不是某个字符或标点用了全角码(不小心把中文输入打开了,可以重点检查一下标点)
Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm,英文版本,chm 格式,大小 1 Mb,作者:Joshua Bloch、Neal Gafter。 内容预览: Chapter 1. Introduction Chapter 2. Expressive Puzzlers Puzzle 1: Oddity Puzzle 2: Time for a Change Puzzle 3: Long Division Puzzle 4: It's Elementary Puzzle 5: The Joy of Hex Puzzle 6: Multicast Puzzle 7: Swap Meat Puzzle 8: Dos Equis Puzzle 9: Tweedledum Puzzle 10: Tweedledee Chapter 3. Puzzlers with Character Puzzle 11: The Last Laugh Puzzle 12: ABC Puzzle 13: Animal Farm Puzzle 14: Escape Rout Puzzle 15: Hello Whirled Puzzle 16: Line Printer Puzzle 17: Huh? Puzzle 18: String Cheese Puzzle 19: Classy Fire Puzzle 20: What's My Class? Puzzle 21: What's My Class, Take 2 Puzzle 22: Dupe of URL Puzzle 23: No Pain, No Gain Chapter 4. Loopy Puzzlers Puzzle 24: A Big Delight in Every Byte Puzzle 25: Inclement Increment Puzzle 26: In the Loop Puzzle 27: Shifty i's Puzzle 28: Looper Puzzle 29: Bride of Looper Puzzle 30: Son of Looper Puzzle 31: Ghost of Looper Puzzle 32: Curse of Looper Puzzle 33: Looper Meets the Wolfman Puzzle 34: Down for the Count Puzzle 35: Minute by Minute Chapter 5. Exceptional Puzzlers Puzzle 36: Indecision Puzzle 37: Exceptionally Arcane Puzzle 38: The Unwelcome Guest Puzzle 39: Hello, Goodbye Puzzle 40: The Reluctant Constructor Puzzle 41: Field and Stream Puzzle 42: Thrown for a Loop Puzzle 43: Exceptionally Unsafe Puzzle 44: Cutting Class Puzzle 45: Exhausting Workout Chapter 6. Classy Puzzlers Puzzle 46: The Case of the Confusing Constructor Puzzle 47: Well, Dog My Cats! Puzzle 48: All I Get Is Static Puzzle 49: Larger Than Life Puzzle 50: Not Your Type Puzzle 51: What's the Point? Puzzle 52: Sum Fun Puzzle 53: Do Your Thing Puzzle 54: Null and Void Puzzle 55: Creationism Chapter 7. Library Puzzlers Puzzle 56: Big Problem Puzzle 57: What's in a Name? Puzzle 58: Making a Hash of It Puzzle 59: What's the Difference? Puzzle 60: One-Liners Puzzle 61: The Dating Game Puzzle 62: The Name Game Puzzle 63: More of the Same Puzzle 64: The Mod Squad Puzzle 65: A Strange Saga of a Suspicious Sort Chapter 8. Classier Puzzlers Puzzle 66: A Private Matter Puzzle 67: All Strung Out Puzzle 68: Shades of Gray Puzzle 69: Fade to Black Puzzle 70: Package Deal Puzzle 71: Import Duty Puzzle 72: Final Jeopardy Puzzle 73: Your Privates Are Showing Puzzle 74: Identity Crisis Puzzle 75: Heads or Tails? A Glossary of Name Reuse Chapter 9. More Library Puzzlers Puzzle 76: Ping Pong Puzzle 77: The Lock Mess Monster Puzzle 78: Reflection Infection Puzzle 79: It's a Dog's Life Puzzle 80: Further Reflection Puzzle 81: Charred Beyond Recognition Puzzle 82: Beer Blast Puzzle 83: Dyslexic Monotheism Puzzle 84: Rudely Interrupted Puzzle 85: Lazy Initialization Chapter 10. Advanced Puzzlers Puzzle 86: Poison-Paren Litter Puzzle 87: Strained Relations Puzzle 88: Raw Deal Puzzle 89: Generic Drugs Puzzle 90: It's Absurd, It's a Pain, It's Superclass! Puzzle 91: Serial Killer Puzzle 92: Twisted Pair Puzzle 93: Class Warfare Puzzle 94: Lost in the Shuffle Puzzle 95: Just Desserts Appendix A. Catalog of Traps and Pitfalls 1. Lexical Issues 2. Integer Arithmetic 3. Floating-Point Arithmetic 4. Expression Evaluation 5. Flow of Control 6. Class Initialization 7. Instance Creation and Destruction 8. Other Class- and Instance-Related Topics 9. Name Reuse 10. Strings 11. I/O 12. Threads 13. Reflection 14. Serialization 15. Other Libraries Appendix B. Notes on the IllusionsAmbiguous Figures Impossible Figures Geometrical Illusions: Size Geometrical Illusions: Direction Subjective Contours Anomalous Motion Illusions Illusions of Lightness Compound Illusions
湖 南 大 学 信息科学与工程学院 实 验 报 告 "实验名称 "香农编码 " "课程名称 "信息论与编码 " " " " 1、实验目的 (1)进一步熟悉Shannon编码算法; (2)掌握C语言程序设计和调试过程中数值的进制转换、数值与字符串之间的转换等技 术。 2、实验要求 (1)输入:信源符号个数q、信源的概率分布p; (2)输出:每个信源符号对应的Shannon编码的码字。 3、Shannon编码算法 1:procedure SHANNON(q,{}) 2: 降序排列{} 3: for i=1 q do 4: F() 5: 6:将累加概率F()(十进制小数)变换成二进制小数。 7:取小数点后个二进制数字作为第i个消息的码字。 8:end for 9:end procedure ---------------------------------------------------------------------------- -------------------------------------- 调试过程 1、fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory fatal error C1083: Cannot open include file: 'values.h': No such file or directory 原因:unistd.h和values.h是Unix操作系统下所使用的头文件 纠错:删去即可 2、error C2144: syntax error : missing ')' before type 'int' error C2064: term does not evaluate to a function 原因:l_i(int *)calloc(n,sizeof(int)); l_i后缺少赋值符号使之不能通过编译 纠错:添加上赋值符号 error C2018: unknown character '0xa1' 原因:有不能被识别的符号 纠错:在错误处将不能识别的符号改为符合C语言规范的符号 error C2021: expected exponent value, not ' ' 原因:if(fabs(sum-1.0)>DELTA); 这一行中DELTA宏定义不正确 纠错:# define DELTA 0.000001 error C2143: syntax error : missing ';' before '}' 原因:少写了";"号 纠错:在对应位置添加上";"号 参考代码 # include # include # include # include # define DELTA 0.000001/*精度*/ void sort(float*,int);/*排序*/ int main(void) { register int i,j; int n; /*符号个数*/ int temp;/*中间变量*/ float *p_i; /*符号的概率*/ float *P_i; /*累加概率*/ int *l_i; /*码长*/ char * *C; /*码集合*/ /*用sum来检验数据,用p来缓存了中间数据*/ float sum,p; /*输入符号数*/ fscanf(stdin,"%d",&n); /*分配内存地址 */ p_i=(float *)calloc(n,sizeof(float)); P_i=(float *)calloc(n,sizeof(float)); l_i=(int *)calloc(n,sizeof(int)); /* 存储信道传输的概率*/ for(i=0;iDELTA) fprintf(stderr,"Invalid input data \n"); fprintf(stdout,"Starting…\n\n"); /*以降序排列概率*/ sort (p_i,n); /*计算每个符号的码长*/ for(i=0;i

16,467

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧