为我修复代码Visual C ++吗? [英] Fix code for me Visual C ++?

查看:96
本文介绍了为我修复代码Visual C ++吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的.如果您不需要代码,则在调试时会发送错误消息.
正在编译...
COMPILER.CPP
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(23):错误C2059:语法错误:``常量''
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(23):错误C2143:语法错误:缺少'';''''''''之前的
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(23):错误C2143:语法错误:缺少'';''''''''之前的
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(33):错误C2440:``正在初始化'':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(40):错误C2440:``默认参数'':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(40):错误C2440:``默认参数'':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(40):错误C2548:``generatecode'':缺少参数6的默认参数 C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(40):错误C2548:``generatecode'':缺少参数7的默认参数 C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(77):错误C2440:``正在初始化'':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(95):错误C2065:``clrscr'':未声明的标识符
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(103):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(123):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(142):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(225):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(243):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(289):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(436):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(469):错误C2440:``='':无法从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(629):错误C2660:``generatecode'':函数未使用3个参数
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(642):错误C2660:``generatecode'':函数未使用5个参数
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(666):错误C2660:``generatecode'':函数未使用5个参数
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(702):错误C2664:``generatecode'':无法将参数6从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(704):错误C2660:``generatecode'':函数未使用0个参数
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(728):错误C2664:``generatecode'':无法将参数6从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)
C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(732):错误C2664:``generatecode'':无法将参数6从``const int''转换为``enum boolean''
转换为枚举类型需要显式强制转换(static_cast,C样式强制转换或函数样式强制转换)

Okay. If you don''t need code i will send error when i debug.
Compiling...
COMPILER.CPP
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2059: syntax error : ''constant''
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2143: syntax error : missing '';'' before ''}''
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2143: syntax error : missing '';'' before ''}''
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(33) : error C2440: ''initializing'' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2440: ''default argument'' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2440: ''default argument'' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2548: ''generatecode'' : missing default parameter for parameter 6
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2548: ''generatecode'' : missing default parameter for parameter 7
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(77) : error C2440: ''initializing'' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(95) : error C2065: ''clrscr'' : undeclared identifier
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(103) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(123) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(142) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(225) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(243) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(289) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(436) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(469) : error C2440: ''='' : cannot convert from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(629) : error C2660: ''generatecode'' : function does not take 3 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(642) : error C2660: ''generatecode'' : function does not take 5 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(666) : error C2660: ''generatecode'' : function does not take 5 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(702) : error C2664: ''generatecode'' : cannot convert parameter 6 from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(704) : error C2660: ''generatecode'' : function does not take 0 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(728) : error C2664: ''generatecode'' : cannot convert parameter 6 from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(732) : error C2664: ''generatecode'' : cannot convert parameter 6 from ''const int'' to ''enum boolean''
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)

推荐答案

哇-您的代码有这么多错误?这些错误完全意味着他们所说的话.一个不错的问题是,我有这行代码,这是编译器给我的错误,而不是这里的一堆甚至没有编译的代码,您能为我全部解决吗.查看错误列表,在我看来,您似乎对C ++一无所知.

C:\ Documents and Settings \ PhongLan \ Desktop \ COMPILER.CPP(629):错误C2660:``generatecode'':函数未使用3个参数

算出来有多难?如果我只修复这个丑陋,混乱的代码,以便对其进行编译,那对您有什么帮助?您不知道它是如何工作的,或者为什么.为什么不尝试读一本书,或者只是阅读错误消息并思考它们在说什么呢?当您修复了一些小错误后,无论遇到什么困难,都可以用ALL提出一个特定的问题.我们需要的信息(代码段,错误,您尝试过的方法,等等)
Wow - your code had this many errors ? The errors all mean exactly what they say. A decent question would be, I have this line of code, and here is the error the compiler gives me, not here''s a ton of code that doesn''t even compile, can you fix it all for me. Looking at the list of errors, it looks to me like you have no clue about C++.

C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(629) : error C2660: ''generatecode'' : function does not take 3 parameters

How hard can that be to work out ? If I just fixed this ugly, messy code so it compiled, how would that really help you ? You''d have NO idea how it worked or why. Why not try reading a book, or just read the error messages and think about what they say ? When you''ve fixed the trivial errors, any you''re stuck on, ask a specific question with ALL The info we need ( the code snippet, the error, what you''ve tried, etc )


写道:​​

#include< iostream.h>

#include <iostream.h>



这是无效的C ++

至于其余的,您发布了大量的代码,没有发布任何内容来解释修复"它的含义,没有人会对其进行编译,浏览所有内容并尝试猜测您想要做什么.尝试发布代码段和特定问题.



This is not valid C++

As for the rest, you posted a TON of code, posted nothing to explain what you mean by ''fix''ing it, no way is someone going to compile this, look through it ALL and try to guess what you want done. Try posting code snippets and specific questions.


我们不会为您调试代码.请提出具体问题;不要只是说我的程序坏了,请解决".另外,您在此处粘贴了太多代码...示例代码应尽可能小,并且应使用指定的适当语言将其包含在PRE标签中.例如:
We are not going to debug your code for you. Please ask specific questions; don''t just say "my program is broken, fix it". Also, you''ve pasted too much code here... your sample code should be as small as possible and it should be enclosed in a PRE tag with the appropriate language specified. For example:
<pre lang="C++">int x = 5;</pre>


会产生:


would produce:

int x = 5;


这篇关于为我修复代码Visual C ++吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆