unknown character '0xa3'错误如何解决

talertibet 2003-05-13 09:18:04

#include "stdafx.h"
#include "油门瞬态控制.h"
#include "油门瞬态控制Dlg.h"
#include <afxmt.h>
#include "adt830.h"
#include <math.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
………………
UINT CMyDlg::ThreadTest(void*pParam) // 线程名可能应该改变
{
CMyDlg*pOwner=(CMyDlg*)pParam; // 线程名可能应该改变
::WaitForSingleObject(m_stoptest,INFINITE);// 可能这个写法不对,如果停止后,无法记数
//for和多线程的速度那个更快,否则多线程无法中断for,因而无法记数!
start1(1);
{ { int con_speed_open2=8;//con_speed_open2需要根据实际修改其值
//***************错误出现于下行*****
set_conspeed(1,con_speed_open2); //设置匀速速度(前80度角)
con_pmove(1,iTotalSteps80); //匀速运动到油门开度为80度,
for(int k=800;k>=100;k-=100) //从80度开始减速运行,知道角度太小后,进入下一轮小脉冲的匀速运行
{ set_conspeed(1,k);
con_pmove(1,(int)(5*iXiFenSu)/9); //(5*iXiFenSu)/9 为走一度所需要的脉冲数
icount+=(5*iXiFenSu)/9;
if(::WaitForSingleObject(m_end,0)==WAIT_OBJECT_0)
{
pOwner->GetDlgItem(IDC_BEGIN_BUTTON)->EnableWindow(TRUE); //恢复开始按钮
pOwner->GetDlgItem(IDC_STOP_BUTTON)->EnableWindow(FALSE); //禁用停止按钮
return 0;
} //if( 得到停止测试按钮信息,则跳出测试) goto (最大角度计算)
//如果停止测试比循环快的话就没有必要要这个if和goto那,下同!
}
for(; ; ;)
{ set_conspeed(1, 50);
con_pmove(1,(int)(5*iXiFenSu)/18);
icount+= (5*iXiFenSu)/18;
if(::WaitForSingleObject(m_end,0)==WAIT_OBJECT_0)
{
pOwner->GetDlgItem(IDC_BEGIN_BUTTON)->EnableWindow(TRUE); //恢复开始按钮
pOwner->GetDlgItem(IDC_STOP_BUTTON)->EnableWindow(FALSE); //禁用停止按钮
return 0;
} //if( 得到停止测试按钮信息,则跳出测试) // goto (最大角度计算)
}

return 0;
}

油门瞬态控制Dlg.cpp(470) : error C2018: unknown character '0xa3'
F:\冉景义\复件 6\复件 6\油门瞬态控制Dlg.cpp(470) : error C2018: unknown character '0xbb'

请问如何解决啊!
...全文
5925 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Tue 2003-05-15
  • 打赏
  • 举报
回复
不要有全角的字符,当然是在出错行找。
lwswd 2003-05-15
  • 打赏
  • 举报
回复
同意,使用了中文字符,所以出现这种情况。
talertibet 2003-05-15
  • 打赏
  • 举报
回复
不好意思,私下已经有人给我解决了,所以你们的分就少了点、1
GoldenSword 2003-05-13
  • 打赏
  • 举报
回复 3
再介绍一点小tips
到VC的Tools->Options->Format里面设置Colors
把Number设成红色(自己喜欢就行)
把String设成紫色(...........)
这样文件中什么内容一目了然,如果出现字符串掉引号的情况一下子就看出来了
hualahuala 2003-05-13
  • 打赏
  • 举报
回复
中间有中文的标点符号,
GoldenSword 2003-05-13
  • 打赏
  • 举报
回复
中文字符VC不认识0xa3好像是中文的引号的一半,到处错的一行看看就是了
jemmylau 2003-05-13
  • 打赏
  • 举报
回复 3
把出错的那一行中的所有空白全部删除,然后再重新打上空格。

估计你这代码是从别处copy而来,因为在空白中隐藏了一些看不见的字符,也是编译器不认识的字符,例如:0xa3等
醉马不肖 2003-05-13
  • 打赏
  • 举报
回复
源代码中有不看见0xa3字符,用bin打开你就明白了,
CloudWater 2003-05-13
  • 打赏
  • 举报
回复
查一下出现错误的那一行呀470
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,472

社区成员

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

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

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