c++题目,不知道错误怎么改,求大佬帮忙

#include
using namespace std;
class student
{
private:
string name,number;
int score[3];
int a,b,c;
public:
student()
{
}
void setint(string name,string number,int score[])
{
this->name=name;
this->number=number;
for(int i=0;i {
this->score[i]=score[i];
}
}
void judge(student B[])
{
for(int i=0;i<10;i++)
{
if(B[i].score[0]<B[i+1].score[0])
{
a=i+1;
}
if(B[i].score[1]<B[i+1].score[1])
{
b=i+1;
}
if(B[i].score[2]<B[i+1].score[2])
{
c=i+1;
}
}
cout<<B[a].score[0]<<" "<<B[a].name<<" "<<B[a].number<<endl;
cout<<B[b].score[1]<<" "<<B[b].name<<" "<<B[b].number<<endl;
cout<<B[c].score[2]<<" "<<B[c].name<<" "<<B[c].number<<endl;
}
};

int main()
{
string name,number;
int score[3];
student B;
student *A=new student[10];
for(int i=0;i {
cin>>name>>number;
for(int j=0;j {
cin>>score[j];
}
A[i].setint(name,number,score);
}
B.judge(A);
}

c++
0

1个回答

题目呢??????????????????????????????

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
帮忙看下 不知道怎么改
#includernint f1(int **a, int m,int n)rnrn int c,i,j;rn for(i=0;i
一个不知道怎么改的错误~~
这是最短路径的迪杰斯特拉算法的实现,在*处有个错误,应该怎么改呢?rn[code=C/C++]rn//graph.hrn#includernusing namespace std;rn#define MAX 20rn#define INF 32767rntypedef struct rn int arcs[MAX][MAX]; //邻接矩阵rnMgraph;rnrn//main.cpprn#includern#include "graph.h"rnusing namespace std;rnvoid dijkstra(Mgraph gn,int vtxnum,int v0,int path[],int dist[])rn int i;rn int s[MAX]; //s用以标记那些已经找到最短路径的顶点,数组的初态只包括顶点v0,即s[0]=1rn dist[i] = gn.arcs[0][i]; //数组dist记录源点到其他各顶点当前的最短距离rn //初始化s,dist,pathrn for(int v=0;v>vtxnum;rn gn.arcs[12][12] = 0,15,4,7,INF,INF,INF,INF,INF,INF,INF,INF, -----------------*rn 15,0,7,INF,15,12,INF,INF,INF,INF,INF,INF,rn 4,7,0,INF,16,INF,INF,INF,INF,INF,INF,INF,rn 7,INF,INF,0,8,INF,INF,INF,26,INF,INF,INF,rn INF,15,16,8,0,20,18,INF,30,INF,INF,INF,rn INF,12,INF,INF,20,0,INF,INF,INF,30,INF,INF,INF,rn INF,INF,INF,18,INF,0,3,INF,16,INF,INF,INF,rn INF,INF,INF,INF,INF,INF,3,0,7,INF,INF,INF,rn INF,INF,INF,26,30,INF,INF,7,0,5,15,INF,INF,rn INF,INF,INF,INF,INF,30,19,INF,5,0,INF,20,rn INF,INF,INF,INF,INF,INF,INF,INF,15,INF,0,9,rn INF,INF,INF,INF,INF,INF,INF,INF,INF,20,9,0;rn cout<<"请输入所要求最短路径的顶点:"<<"\n";rn cin>>v0;rn dijkstra(gn,vtxnum,v0,path,dist);rn cout<<"请输入"<>n;rn for(int i=0;i<=n;i++)rn cout<<"从"<"<<"\n";rn rn system("pause");rn return 0;rnrn[/code]rn在*处有个错误 rnIntelliSense: 应输入表达式 d:\visual studio 2010\program\dijkstra\dijkstra\main.cpp dijkstrarn
一个错误不知道怎么改
[code=css]rn#ifndef _DATE_Hrn#define _DATE_Hrn#include rnclass Daternrnpublic:rn enum Monthjan=1,feb,apr,may,jun,jul,aug,sep,oct,nov,dec;rn class Bad_date;rn Date(int dd=0,Month mm=Month(0),int yy=0);rn void Date::string_rep()const;//输出 rn static void set_default(int,Month,int);rn Date& add_year(int n);rn Date& add_month(int n);rn Date& add_day(int n);rn bool leapyear(int y);rnprivate:rn int d,m,y;rn static Date default_date; rn;rn#endifrn//date-func.cpp:rn#include "date.h"rn#include rnDate::Date(int dd=1,Month mm=Month(1);int yy=1970)rnrn int max;rn switch (mm)rn rn case feb:rn max=28+leapyear(yy);rn break;rn case apr:rn case jun:rn case sep:rn case nov:rn max=30;rn break;rn case jan:rn case mar:rn case may:rn case jul:rn case aug:rn case oct:rn case dec:rn max=31;rn default:rn throw Bad_date();rn rn if (dd<1||max0)rn rn int delta_y=n/12;rn int mm=m+n%12;rn if (mm>12)rn rn delta_y++;rn mm-=12;rn rn //处理month(m)没有天数的情况rn y+=delta_y;rn m=Month(mm);rn return *this;rn rn return *this;rnrnDate& Date::add_day(int n)rnrn if (n==0)return *this;rn if (n>0)rn rn std::tm tm;rn tm.tm_sec=0;rn tm.tm_min=0;rn tm.tm_hour=12;rn tm.tm_mday=1+days;rn tm.tm_mon=1;rn tm.tm_year=70;rn std::mktime(&tm);rn d=tm.tm_mday;rn m=tm.tm_mon;rn y=tm.tm_year; rn return *this; rn rn rnstatic void Date::set_default(int,Month,int)rnrn Date::default_date=Date(d,m,y);rnrnbool Date::leapyear(int y)rnrn if (y%4==0&&y%100!=0||y%400==0)rn return true;rn elsern return false;rnrnvoid Date::string_rep()constrnrn std::cout<rn#include "date.h"rnusing namespace std;rnrnint main()rnrn Date ddate(1,Date::Month(1),1970);rn cout<<"starting:\n";rn cout<<"a.加天数 b.加月数\n";rn cout<<"c.加年数 d.退出\n";rn char s;rn int ld,lm,ly;rn while (cin>>s)rn rn switch (s)rn rn case 'a':rn cout<<"输入要加的天数:"; rn cin>>ld;rn ddate.add_day(ld);rn ddate.string_rep();rn break;rn case 'b': rn cout<<"输入要加的月数:"; rn cin>>lm;rn ddate.add_month(lm);rn ddate.string_rep();rn break;rn case 'c':rn cout<<"要输入的年数:";rn cin>>ly;rn ddate.add_year(ly);rn ddate.string_rep();rn break;rn case 'd':rn cout<<"bye"; rn exit(0);rn default:rn break;rn rn rn system("pause");rn return 0;rnrn[/code]rn要实现的功能是从 1月1日1970年,加天、月、年后的日期,函数报错 rnCircular date_func <- date_func.o dependency dropped. rn怎么改也改不过来了,新手求帮助
求大佬帮忙,谢谢谢。。。。。题目在下面
/*输入字符串,内有数字和非字符数组,例如A123x456将其中连续的数字作为一个整数,依次存放到一个数组中,如123放到a[0],456放到a[1],并输出a这些数。为什么我这代码最后一个输出不对*/n#includen#includen#includen#includenchar *s_gets(char *st,int size);nint main()nn char str[30],str1[10][10],*end;n int t=0,m=0,i;long a[9];n printf("请输入一个字符串:");n s_gets(str,30);n for(i=0;i
求大佬指点一下,程序报错不知道怎么改
求大佬指点一下,程序报错不知道怎么改 Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.android.support:support-annotations’ in project ‘:app’. Resolved versions for app (26...
帮忙看一下错误怎么改
我没有按书上的原意写的,还是重载了输出,可提示的错误我不知道怎么改。rnrnrnrn#includernclass Student1rnrnpublic:rn void get_value()rn rn cin>>num>>name>>sex;rn rn friend ostream& operator<<(ostream &out,Student1 &stud)rn rn out<<"number:\n"<>age>>addr;rn cout<
不知道是什么错误,怎么改呢?
[code=Java]rnimport java.util.*; rnimport java.io.*;rnclass CCrn rn public static void main(String args[ ])rn rn System.out.printf("4c%4c%4c%4c%4c%4c%4c%\n",'日','一','二', '三','四','五','六');rn Calendar 日历=Calendar.getInstance(); rn 日历.set(2005,9,1); rn int 星期几=日历.get(Calendar.DAY_OF_WEEK)-1;rn int a[]=new int[星期几+31]; //存放号码的一维数组。rn for(int i=0;i
有几个错误。不知道怎么改。
[code=C/C++][/code]rn#include rnusing namespace std;rnenum objectType Rock, Paper, Scissors;rnvoid displayRules();rnobjectType retrievePlay(char selection);rnbool validSelection(char selection);rnvoid convertEnum(objectType object);rnobjectType winningObject(objectType play1, objectType play2);rnvoid gameResult(objectType play1, objectType play2, int& winner);rnvoid displayResults(int gCount, int wCount1, int wCount2);rnrnint main()rnrn int gameCount;rn int winCount1;rn int winCount2;rn int gamewinner;rn char response;rn char selection1;rn char selection2;rn objectType play1;rn objectType play2;rn gameCount = 0;rn winCount1 = 0;rn winCount2 = 0;rn displayRules();rn cout<<"Enter Y/y to play the game: ";rn cin>>response;rn cout<>selection1;rn cout<>selection2;rn cout<>response;rn cout<
看个错误,不知道怎么改
root@lihui-806:/home/lihui/cli-1.1.0+dep/cli-1.1.0+dep# makern/bin/sh: /home/lihui/cli-1.1.0+dep/cli-1.1.0+dep/build-0.3/git/gitignore: Permission deniedrnmake: *** [/home/lihui/cli-1.1.0+dep/cli-1.1.0+dep/cli/cli/.gitignore] 错误 126rnmake: *** 正在删除文件“/home/lihui/cli-1.1.0+dep/cli-1.1.0+dep/cli/cli/.gitignore”rnrnrn新手,在终端里按说明书装cli,make的时候出现这错误,请教下,最后30分都给了rn
求大佬帮忙看一下
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionExcep...
求大佬帮忙
匿名上位机写了校验码程序,但为什么每次写入飞控时显示校验码超时
大佬求帮忙
求帮忙 ![在这里插入图片描述](https://img-blog.csdnimg.cn/2018112615060233.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MzgwNDcyMQ==,size_16,col...
求大佬帮忙!!!
void modify(char* stuid,char*name,int num)rn rn rn if( !checkAdd(stuid))rn printf("请选择修改项目:1—学号;2—姓名;3—成绩");rn scanf("%d",&p);rn switch(p)rn rn case 2:rn printf("请输入新名字");rn scanf("%s",Newname);rn strcpy(name,Newname);rn printf("成功");rn break;rn rn rnrnrn elseprintf("无信息");rnrnrnrnrnrn这是程序的一部分 rn编译没问题rnstrcpy(name,Newname);rn但是这个改变名字的话不对 不能修改名字 求指教rn
求大佬帮忙!
[img=https://img-bbs.csdn.net/upload/201806/07/1528383371_744806.png][/img]rn小白求助这几个BUG怎么修复,顺便附上源代码。rnstring grammar = "FA[*+X][-/&X][/%X]B";//文法 rnvoid Grammar::Iteration() rn string temprule = grammar;rn for (int i = 1; i <= level; i++)rn rn int curlen = temprule.length();rn int j = 0;rn while (j < curlen)rn rn if (temprule[j] == 'X')//迭代,替换成文法模型rn rn rule += grammar;rn j++;rn rn else //保留转角rn rn rule += temprule[j];rn j++;rn rn rn temprule = rule;rn rule.clear();rn rn rule = temprule;//迭代好之后的文法规则rnrnvector trunks; // 所有分支rnvector leaves;//所有叶子结点rnvoid LSystem::generateFractal() // 利用加载过的文法,创建分形树rnrn trunks.clear();rn leaves.clear();rn curState.pos = Node(0, 0, 0);rn curState.dir = Node(0, 1, 0);rnrn State stack[3000]; // 状态栈rn for (int i = 0; i <3000; i++)rn rn stack[i].pos.x = 0.0;rn stack[i].pos.y = 0.0;rn stack[i].pos.z = 0.0;rn stack[i].dir.x = 0.0;rn stack[i].dir.y = 0.0;rn stack[i].dir.z = 0.0;rn rn size_t i = 0;rn while (i
大佬们,求帮忙
[img=https://img-bbs.csdn.net/upload/201808/30/1535617908_474864.jpg][/img] 这个情况怎么解决啊,求大神们指导,
求大佬帮忙~
需求如下:rn表1 rnname ..... rn张三 rn李四rn...rnrn表2rnname 课程rn张三 语文rn张三 数学rn李四 语文rn李四 数学rn李四 英语rnrn想要的效果rn张三 语文,数学rn李四 语文,数学,英语rn...rnrn求各位大佬帮忙~ 感激不尽!
求助!求大佬帮忙
[img=https://img-bbs.csdn.net/upload/201905/27/1558886821_837807.png][/img]rn请问这个错误要怎么修改?
大佬们求帮忙
#includern#includern#includernusing namespace std;rntypedef structrn float data;rn int index;rnElement;rnclass Polynomialrn public:rn void create();rn void print();rn void add(Polynomial &a,Polynomial &b); rn //private:rn vectorPolynomial_vector;rn;rnvoid Polynomial::create()rn int m,i;rn Element p;rn cout<<"输出一元多项式的项数:";rn cin>>m;rn for(i=0;i>p.data>>p.index;rn Polynomial_vector.push_back(p);rn rnrnvoid Polynomial::print()rn vector::iterator iter;rn for(iter=Polynomial_vector.begin();iter!=Polynomial_vector.end();iter++)rn if((*iter).data!=0)rn if((*iter).index==0)rn cout<<(*iter).data<::iterator iter1=a.Polynomial_vector.begin();rn vector::iterator iter2=Polynomial_vector.begin(); rn vector::iterator iter3;rn Element t;rn int temp;rn nomial_vector.end()))rn temp=(*iter1).index;rn iter3=find(Polynomial_vector.begin(),Polynomial_vector.end(),temp);rn if(iter3!=Polynomial_vector.end())rn if((*iter1).data+(*iter2).data!=0)rn t.index=(*iter1).index;rn t.data=(*iter1).data+(*iter2).data;rn b.Polynomial_vector.push_back(t) ;rn iter1++;rn iter2++;rn rn elsern iter1++;rn iter2++;rn rn rn elsern b.Polynomial_vector.push_back((*iter1));rn iter1++;rn rn rn if(iter1!=a.Polynomial_vector.end())rn b.Polynomial_vector.push_back(*iter1++);rn rn if(iter2!=Polynomial_vector.end())rn b.Polynomial_vector.push_back(*iter2++);rn rn rnrnrnbool com(Element e1,Element e2)rn return e1.index
求大佬帮忙看看
错误信息:rnClientAbortException: java.net.SocketException: Software caused connection abort: socket write errorrn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)rn at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)rn at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)rn at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)rn at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)rn at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)rn at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)rn at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)rn at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)rn at java.io.Writer.write(Writer.java:157)rn at org.springframework.util.StreamUtils.copy(StreamUtils.java:118)rn at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:106)rn at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:41)rn at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:227)rn at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:247)rn at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:174)rn at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:113)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.net.SocketException: Software caused connection abort: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:155)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)rn ... 45 morern十一月 16, 2017 4:29:10 下午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet MVC DispatcherServlet threw exceptionrnjava.lang.NullPointerExceptionrn at com.zhwy.exception.MyExceptionHandler.resolveException(MyExceptionHandler.java:54)rn at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1222)rn at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1034)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:745)rn
求这个错误怎么改
代码如下:rnrn// MiniDrawView.cpp : CMiniDrawView 类的实现rn//rnrn#include "stdafx.h"rn// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的rn// ATL 项目中进行定义,并允许与该项目共享文档代码。rn#ifndef SHARED_HANDLERSrn#include "MiniDraw.h"rn#endifrnrn#include "MiniDrawDoc.h"rn#include "MiniDrawView.h"rnrn#ifdef _DEBUGrn#define new DEBUG_NEWrn#endifrnrnrn// CMiniDrawViewrnrnIMPLEMENT_DYNCREATE(CMiniDrawView, CView)rnrnBEGIN_MESSAGE_MAP(CMiniDrawView, CView)rn // 标准打印命令rn ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)rn ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)rn ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CMiniDrawView::OnFilePrintPreview)rn ON_WM_LBUTTONDOWN()rn ON_WM_MOUSEMOVE()rn ON_WM_LBUTTONUP()rnEND_MESSAGE_MAP()rnrn// CMiniDrawView 构造/析构rnrnCMiniDrawView::CMiniDrawView()rnrn // TODO: 在此处添加构造代码rn m_Dragging=0;rn m_HCross=AfxGetApp()->LoadStandardCursor(IDC_CROSS);rnrnrnrnCMiniDrawView::~CMiniDrawView()rnrnrnrnBOOL CMiniDrawView::PreCreateWindow(CREATESTRUCT& cs)rnrn // TODO: 在此处通过修改rn // CREATESTRUCT cs 来修改窗口类或样式rnrn m_ClassName = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, 0, (HBRUSH)::GetStockObject-j ect(WHITE_BRUSH), 0);rn cs.lpszClass=m_ClassName;rn return CView::PreCreateWindow(cs);rnrnrn// CMiniDrawView 绘制rnrnvoid CMiniDrawView::OnDraw(CDC* /*pDC*/)rnrn CMiniDrawDoc* pDoc = GetDocument();rn ASSERT_VALID(pDoc);rn if (!pDoc)rn return;rnrn // TODO: 在此处为本机数据添加绘制代码rnrnrnrn// CMiniDrawView 打印rnrnrnvoid CMiniDrawView::OnFilePrintPreview()rnrn#ifndef SHARED_HANDLERSrn AFXPrintPreview(this);rn#endifrnrnrnBOOL CMiniDrawView::OnPreparePrinting(CPrintInfo* pInfo)rnrn // 默认准备rn return DoPreparePrinting(pInfo);rnrnrnvoid CMiniDrawView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)rnrn // TODO: 添加额外的打印前进行的初始化过程rnrnrnvoid CMiniDrawView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)rnrn // TODO: 添加打印后进行的清理过程rnrnrnvoid CMiniDrawView::OnRButtonUp(UINT /* nFlags */, CPoint point)rnrn ClientToScreen(&point);rn OnContextMenu(this, point);rnrnrnvoid CMiniDrawView::OnContextMenu(CWnd* /* pWnd */, CPoint point)rnrn#ifndef SHARED_HANDLERSrn theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EDIT, point.x, point.y, this, TRUE);rn#endifrnrnrnrn// CMiniDrawView 诊断rnrn#ifdef _DEBUGrnvoid CMiniDrawView::AssertValid() constrnrn CView::AssertValid();rnrnrnvoid CMiniDrawView::Dump(CDumpContext& dc) constrnrn CView::Dump(dc);rnrnrnCMiniDrawDoc* CMiniDrawView::GetDocument() const // 非调试版本是内联的rnrn ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMiniDrawDoc)));rn return (CMiniDrawDoc*)m_pDocument;rnrn#endif //_DEBUGrnrnrn// CMiniDrawView 消息处理程序rnvoid CMiniDrawView::OnLButtonDown(UINT nFlags,CPoint point)rnrn //TODO:Add your message handler code here and/or callrn //defaltrn m_PointOrigin = point;rn m_PointOld = point;rn SetCapture();rn m_Dragging = 1;rnrn RECT Rect;rn GetClientRect(&Rect);rn ClientToScreen(&Rect);rn ::ClipCursor(&Rect);rnrn CView::OnLButtonDown(nFlags,point);rnrnvoid CMiniDrawView::OnMouseMove(UINT nFlags,CPoint point)rnrn //TODO:Add your message handler code here and/or callrn //defaultrn ::SetCursor(m_HCross);rn if(m_Dragging)rn rn CClientDC ClientDC(this);rn ClientDC.SetROP2(R2_NOT);rn ClientDC.MoveTo(m_PointOrigin);rn ClientDC.LineTo(m_PointOld);rn ClientDC.MoveTo(m_PointOrigin);rn ClientDC.LineTo(point);rn m_PointOld=point;rn rn CView::OnMouseMove(nFlags,point);rnrnvoid CMiniDrawView::OnLButtonUp(UINT nFlags,CPoint point)rnrn //TODO:Add your message handler code here and/or call defaultrn if(m_Dragging)rn rn m_Dragging=0;rn ::ReleaseCapture();rn ::ClipCursor(NULL);rn CClientDC ClientDC(this);rn ClientDC.SetROP2(R2_NOT);rn ClientDC.MoveTo(m_PointOrigin);rn ClientDC.LineTo(m_PointOld);rn ClientDC.SetROP2(R2_COPYPEN);rn ClientDC.MoveTo(m_PointOrigin);rn ClientDC.LineTo(point);rn rnrn CView::OnLButtonUp(nFlags,point);rnrnrn错误在这一句:m_ClassName = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, 0, (HBRUSH)::GetStockObject-j ect(WHITE_BRUSH), 0);rn报错:1>c:\users\john\documents\visual studio 2012\projects\minidraw\minidraw\minidrawview.cpp(53): error C2065: “j”: 未声明的标识符rn1>c:\users\john\documents\visual studio 2012\projects\minidraw\minidraw\minidrawview.cpp(53): error C2146: 语法错误: 缺少“)”(在标识符“ect”的前面)rn1>c:\users\john\documents\visual studio 2012\projects\minidraw\minidraw\minidrawview.cpp(53): error C2059: 语法错误:“)”rnrn鼠标放在“j”上提示“未定义标识符“j”” 鼠标放在“ect”上提示应输入“)”
c语言 运行出错 求大佬帮忙
#include n#includen#includen#includenn//定义全局变量nint isEmpty=0;//标志,判断链表是否为空 nn//!!!定义单链表结构体!!! ntypedef struct Noden int NUM;//类型总数 n char NAME[100];//各类型名称 n int num; //各类型下的货物总数n struct Node*next;nNode;nn//函数声明 nNode*create(int n,Node*L);nNode*input(Node*L);nNode*output(Node*L);nNode*outnum(Node*L);nNode*outname(Node*L);nNode*current(Node*L);nvoid search(Node*L);nvoid print(Node*L);nvoid searchnum(Node*L);nvoid searchname(Node*L);nvoid display(Node*L);n//========新增加的函数========nNode*append(Node*L); nn//主函数nvoid main()nn int x;n int n;//初次输入的大小 n Node *L;n if(!(L=(Node *)malloc(sizeof(Node)))) //分配空间n n printf("\n");n exit(1);n n n printf("欢迎使用我的仓库管理系统!\n"); n while(1);n n //主菜单开始 n printf("==========================\n");n printf("1.显示货物类型列表\n");n printf("2.增加货物类型\n");n printf("3.删除货物类型\n");n printf("4.货物入库\n");n printf("5.货物出库\n");n printf("6.库存显示\n");n printf("7.退出\n");n printf("==========================\n");n //主菜单结束n printf("选择1-7:");n scanf("%d",&x); n switch(x)n n case 1:;break;n case 2:create(n,L);break;n case 3:;break;n case 4:;break;n case 5:;break;n case 6:;break;n case 7:;break;n default:printf("input error!\nplaese input1-7");n n n nnnnnn//函数n//1.创建链表节点nNode*create(int n,Node*L)nn Node*pTail=L; n L->next=NULL;n Node*p;n p=(Node*)malloc(sizeof(Node));n if(p==NULL)n n printf("申请内存空间失败!\n");n n //利用尾插建立单链表 n int i;n for(i=1;i<=n;i++)n n printf("请输入第%d种类型编号:\n",i);n scanf("%d",&p->NUM);n printf("请输入第%d种类型名称:\n",i);n scanf("%s",&p->NAME);n printf("请输入第%d种类型库存:\n",i);n scanf("%d",&p->num);n pTail->next=p;n pTail=p;n n p->next=NULL;n return L; n n![图片说明](https://img-ask.csdn.net/upload/201805/28/1527489393_274380.png)n欢迎下面就运行不了了
不知道怎么改
D:\程序设计>javac JDialogDemo1.javarnJDialogDemo1.java:4: 类 MyDialog 是公共的,应在名为 MyDialog.java 的文件中声明rnpublic class MyDialog extends JDialog implements ActionListenerrn rnrn这是什么意思,哪里出错了,怎么改 ^
C语言五子棋下棋代码怎么改?求大佬
那个啥,我已经把下棋的部分改过了rn可是为什么还是能把黑棋(白棋)覆盖在白棋(黑棋)上?rnrn```rnif(currentColor==1)rn rn if(chess[i][j]==0)rn chess[i][j]=1;rn currentColor=0; rn rn rn else if(currentColor==0)rn rn if(chess[i][j]==0)rn chess[i][j]=-1;rn currentColor=1;rn rn rn```rn```rnswitch (currentColor) rn rn case 1:rn chess[i][j] = 1;rn currentColor=0;rn break; rn case 0:rn chess[i][j] = -1;rn currentColor=1;rn break;rn default:rn break;rn rn```rn这两段代码不能替换吗?rn用switch的会覆盖rn而用if的则不会
不知道怎么改?
有点问题,希望帮我啊 rnpublic class Drn C[] arrays = new C[5];rn D()rn for(int i = 0;i < arrays.length; i++)rn arrays[i] = new C();rn rn rn rn D(String s)rn for(int i = 0;i < arrays.length; i++)rn arrays[i] = new C(s);rn rn rn String[] sa1 = "aa","ss","dd","ff","gg";rn rn public static void main(String[] args)rn D yuan = new D();rn for (int i = 0 ;i < sa1.length;i ++)rn D qian = new D(sa1[i]);rn rn rnrnrnclass Crn C()rn System.out.println("Hello World!!");rn rn C(String s)rn System.out.println("Hello"+s);rn rn
导入时提示错误,不知道解决办法,请大佬帮忙!!!!
提示如下:rn.正在将SYSTEM的对象导入到SYSTEMrn.正在将PEPSI的对象导入到PEPSIrnIMP-00017:由于ORACLE错误439,以下语句失败rn"CREATE TYPE " FF" TIMESTAMP '2002-11-27:09:59:18' OID 'BO631098F61975C6E003A" "C12010B75C6' AS OBJECTS"rn"(aa varchar2(10),"rnbb number(10))"rnIMP-00003:oracle错误439出现rnORA-00439:未启用功能:Objectsrn..正在导入表 "test"rnrnrn但是到这就停止了,一直无法导入rn郁闷中rn请各位高手解惑,THANK YOU VERY MUCH
求助,帮忙看下怎么改错误
我是跟着教程一步一步做的,教程中的版本是VC++6.0rn我自己用的版本是VC++2013,rn但是跟着写下面代码的时候我的代码报错,rn核对了好多次,代码和教程中的代码是一样的。可就是报错rnrn求解rnrn[img=https://img-bbs.csdn.net/upload/201412/19/1418938615_133082.jpg][/img]
不知道什么错误,求高手帮忙!!!!
#includernrn#includernrn#includernrn#includernrn#define PI 3.1415926rnrnlong WINAPI WndProc(HWND hWnd,rn UINT iMessage,rn UINT wParam,rn UINT lParam);rnrndouble dfTheta = 0, dfRange = 100.0;rnrnlong i = 0, j = 0;rnrnlong lCentreX = 0, lCentreY = 0, lRadious = (long)(0.2 * dfRange);rnrnPOINT lpSin[100];rnrnint WINAPI WinMain(HINSTANCE hInstance,rn HINSTANCE hPrevInstance,rn LPSTR lpCmdLine,rn int nCmdShow)rnrn MSG Message;rnrn HWND hWnd;rnrn WNDCLASS WndClass;rnrn WndClass.cbClsExtra = 0;rnrn WndClass.cbWndExtra = 0;rn rn WndClass.hIcon = LoadIcon(NULL,IDI_APPLICATION);rnrn WndClass.hCursor = LoadCursor(NULL,IDC_ARROW);rnrn WndClass.hbrBackground = (HBRUSH)(GetStockObject(WHITE_BRUSH));rnrn WndClass.hInstance = hInstance;rn rn WndClass.lpfnWndProc = WndProc;rnrn WndClass.lpszClassName = "SIN";rnrn WndClass.lpszMenuName = NULL;rnrn WndClass.style = 0;rnrn if(!RegisterClass(&WndClass))rn rn MessageBeep(0);rnrn return FALSE;rn rnrn hWnd = CreateWindow("SIN",rn "移动的圆",rn WS_OVERLAPPEDWINDOW,rn CW_USEDEFAULT,rn 0,rn CW_USEDEFAULT,rn 0,rn NULL,rn NULL,rn hInstance,rn NULL);rnrn ShowWindow(hWnd,nCmdShow);rnrn UpdateWindow(hWnd);rnrn for(int j = 0; j < 100; j++)rn rn lpSin[j].x = (long)(j * 2 * PI / 100 *60);rnrn lpSin[j].y = (long)(dfRange * sin(j * 2 *PI / 100));rn rnrn while(GetMessage(&Message, 0, 0, 0))rn rn TranslateMessage(&Message);rnrn DispatchMessage(&Message);rn rn return Message.wParam;rnrnrnlong WINAPI WndProc(HWND hWnd,rn UINT iMessage,rn UINT wParam,rn LONG lParam)rnrn HDC hDC;rnrn HBRUSH hBrush;rnrn HPEN hPen;rnrn PAINTSTRUCT PtStr;rnrn switch(iMessage)rn rn case WM_PAINT:rnrn hDC = BeginPaint(hWnd, &PtStr);rnrn SetWindowOrgEx(hDC, -200, -200, NULL);rnrn hPen = CreatePen(PS_DASH, 1, RGB(255, 0, 0));rnrn SelectObject(hDC, hPen);rnrn Polyline(hDC, lpSin, 100);rnrn if(i <= 25)rn rn hPen = CreatePen(PS_DASH, 1, RGB(255, 0, 0));rnrn hBrush = CreateHatchBrush(HS_BDIAGONAL, RGB(255, 0 ,0));rnrn lRadious = (long)(dfRange * 0.2 + i % 25 * dfRange *0.4 / 25);rn rnrn else if(i <= 50)rn rn hPen = CreatePen(PS_DASH, 1, RGB(0, 255, 0));rnrn hBrush = CreateHatchBrush(HS_BDIAGONAL, RGB(0, 255 ,0));rnrn lRadious = (long)(dfRange * 0.2 + i % 25 * dfRange *0.4 / 25);rn rnrn else if(i <= 75)rn rn hPen = CreatePen(PS_DASH, 1, RGB(0, 0, 255));rnrn hBrush = CreateHatchBrush(HS_BDIAGONAL, RGB(0, 0, 255));rnrn lRadious = (long)(dfRange * 0.2 + i % 25 * dfRange *0.4 / 25);rn rnrn elsern rn hPen = CreatePen(PS_DASH, 1, RGB(255, 255, 0));rn hBrush = CreateHatchBrush(HS_BDIAGONAL, RGB(255, 255, 0));rn lRadious = (long)(dfRange * 0.2 + i % 25 * dfRange *0.4 / 25);rn rnrn SelectObject(hDC, hBrush);rnrn SelectObject(hDC, hPen);rnrn lCentreX = lpSin[i].x;rnrn lCentreY = lpSin[i].y;rnrn Ellipse(hDC, lCentreX - lRadious, lCentreY - lRadious, lCentreX + lRadious, lCentreY + lRadious);rnrn i++;rnrn DeleteObject(hPen);rnrn DeleteObject(hBrush);rnrn EndPaint(hWnd, &PtStr);rnrn Sleep(100);rnrn if(i < 100) InvalidateRect(hWnd, NULL, 1);rnrn return 0;rnrn case WM_DESTROY:rnrn PostQuitMessage(0);rnrn return 0;rnrn default:rnrn return(DefWindowProc(hWnd, iMessage, wParam, lParam));rn rnrn
大家帮忙看看这个程序 还有一个错误 不知道怎么改
原代码:(检验括号匹配)rn#includern#includern#define STACK_INIT_SIZE 100rn#define STACKINCREMENT 10rn#define OK 1rn#define OVERFLOW -2rn#define FALSE 0rn#define TRUE 1rntypedef structrn char *base;rn char *top;rn int stacksize;rnSqStack;rnrnint InitStack(&S)rn //构造一个空栈rnS.base=(char *)malloc(STACK_INIT_SIZE *sizeof(char)rnif(!S.base) exit(OVERFLOW);//存储分配失败rnS.top=S.base;rnS.stacksize=STACK_INIT_SIZE;rnreturn OK;rnrnrnint Push(SqStack &S,char &e)rn //插入新元素e为新的栈顶元素rn if(S.top-S.base>=S.stacksize)//栈满,追加储存空间rn S.base=(char *)realloc(S.base,(S.stacksize+STACKINCREMENT)*sizeof(char));rnif(!S.base) exit(OVERFLOW);//存储分配失败rnS.top=S.base+S.stacksize;rnS.stacksize+=STACKINCREMENT;rn rn *S.top++=e;rn return OK;rnrnrnint pop(Sqstack &S,char &e)rn //若栈不空,则删除S的栈顶元素,用e返回其值,并返回OK;否则返回ERRORrn if(S.top==S.base) return ERROR;rn e=*--S.top;rn return OK;rnrnrnchar getchar()rnchar n;rn scanf("%c",&n);rn return n;rnrnmain()rnSqStack S;rnchar ch;rnint InitStack(&S);rnwhile((ch=getchar())!='\n')//输入字符rn switch(ch)rn case '(':rn case '[':rn case '':int Push(&S,ch);break;//遇左括号进栈rn case ')':if(S.top==S.base) return FALSE;rn elseint Pop(&S,&ch);rn if(ch!='(') return FALSE;rn break;rn case '':if(S.top==S.base) return FALSE;rn elsePop(&S,&ch);rn if(ch!='') return FALSE;rn break;rn default:break;rn rn rn if(S.top==S.base) return TRUE;rn else return FALSE;rnrn
帮忙看看代码,不知道这个错误该怎么改?
我定义了TRGBLine1这个数组,用来指向每一个象素的r,g,b值rntypern TRGB1=recordrn R1,G1,B1:byte;rn end;rn TRGBLine1=array[0..65535]of TRGB1;rn for k:=0 to ((image2.Width)*(image2.height)-1) dorn beginrn ......rn hsvtorgb(h,t,z,r,g,b);//调用自定义函数进行转换rn TRGBLine1[k].R1:=r;//这里出错显示"("expected,but"["found.rn TRGBLine1[k].G1:=g;//同上rn TRGBLine1[k].B1:=b;//同上rn end;rn l:=0;rn for i:=0 to image2.Height-1 dorn beginrn scanline:=image2.picture.bitmap.Scanline[i];rn for j:=0 to image2.Width-1 dorn beginrn scanline[j].r:=TRGBLine1[l].R1;rn scanline[j].G:=TRGBLine1[l].G1;rn scanline[j].b:=TRGBLine1[l].B1;rn inc(l);rn end;rn end;rn Image2.Refresh;rnend;rn
新手求大佬帮忙看看
刚学C语言,实在没法理解。昨天自己憋了一下午,也没看出什么地方有问题。rn[code=c]#pragma warning(disable:4996)rn#includernint main()rnrn char str1[30], str2[30];rn printf("please enter string:");rn gets(str1);rn printf("which character that begin to copy? ");rn int m;rn scanf("%d", &m);rn void str_c(char x[], char y[], int n);rn str_c(str1, str2, m);rn printf("%s\n", str2);rn return 0;rnrnvoid str_c(char x[], char y[], int n)rnrn int i;rn for (i = n; i != '\0'; i++)rn rn y[i - n] = x[i];rn y[i - n] = '\0';rnrn[/code]rnrnrn后面写的str_c 函数目的是想把字符串x中第n个字符后面的复制到字符串y中去。真的无法理解为什么这么写会运行出错?rn有没有前辈解释一下哪错了?谢谢
求大佬帮忙做个网页
[img=https://img-bbs.csdn.net/upload/201805/18/1526627276_320109.jpg][/img][img=https://img-bbs.csdn.net/upload/201805/18/1526627288_701578.jpg][/img][img=https://img-bbs.csdn.net/upload/201805/18/1526627298_784614.jpg][/img][img=https://img-bbs.csdn.net/upload/201805/18/1526627304_843611.jpg][/img]做成效果图那样的,在线等,挺急的!!!!
求大佬来帮忙看看
eclipse一直报An internal error occurred during: "Computing Git status for repository hp222".Trailing char < > at index 82: C:\Users\hp222\AppData\Roaming\duowan\yy\mainframe\theme\float\star-V1-V6-apng.png
不知道哪错了!!!大佬帮忙看看
Type Exception ReportrnrnMessage An exception occurred processing JSP page [/user/top.jsp] at line [31]rnrnDescription The server encountered an unexpected condition that prevented it from fulfilling the request.rnrnExceptionrnorg.apache.jasper.JasperException: An exception occurred processing JSP page [/user/top.jsp] at line [31]rnrn28: rn29: rn30: rn31: $sessionScope.currUser.userNamern32: rn33: rn34: rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:742)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rnrnrnRoot Causernjavax.el.PropertyNotFoundException: Property [userName] not found on type [don.Bean.User]rn javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260)rn javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:212)rn javax.el.BeanELResolver.property(BeanELResolver.java:347)rn javax.el.BeanELResolver.getValue(BeanELResolver.java:92)rn org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)rn org.apache.el.parser.AstValue.getValue(AstValue.java:169)rn org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)rn org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:944)rn org.apache.jsp.user.Login_jsp._jspx_meth_c_005fif_005f1(Login_jsp.java:282)rn org.apache.jsp.user.Login_jsp._jspService(Login_jsp.java:162)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:742)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:742)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rnrn[code=html]rn<%@ page language="java" contentType="text/html; charset=utf-8"rn pageEncoding="utf-8"%>rn<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>rnrnrn rn rn rn 登录rn rn rn rn <%@include file="top.jsp"%>rn rn rn rn rn rn rn rn 用户登录rn rn rn rn 用户名:rn rn rn rn 密码:rn rn rn rn rn 忘记密码?rn rn rn 还没有账号?rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[code=html]rn<%@ page language="java" contentType="text/html; charset=utf-8"rn pageEncoding="utf-8"%>rn<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>rn<%@page import="java.text.SimpleDateFormat,java.util.Date"%>rnrnrn rn rn rn toprn rn rn rn rn rn 做了么菜谱网rn rn $session.currUser.userNamern rn rn rn rn 您尚未登录,请rn 登陆 rn 或rn 注册 rn rn rn rn rn $sessionScope.currUser.userNamern rn rn rn rn rnrn[/code]
这个错误怎么改?求解答
type Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnorg.apache.jasper.JasperException: /test/jsp/input_content.jsp(3,16) equal symbol expectedrn org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)rn org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)rn org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)rn org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:238)rn org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:188)rn org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:393)rn org.apache.jasper.compiler.Parser.parseDirective(Parser.java:512)rn org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)rn org.apache.jasper.compiler.Parser.parse(Parser.java:171)rn org.apache.jasper.compiler.ParserController.parse(ParserController.java:253)rn org.apache.jasper.compiler.ParserController.parse(ParserController.java:137)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:856)rnrnrnrnnote The full stack trace of the root cause is available in the Tomcat logs.rn
求帮忙看看怎么改代码
[code=sql]rncreate PROC P_DeleternASrnBEGINrnDECLARE @p_id INTrnSELECT @p_id = id FROM node WITH(NOLOCK) WHERE tablename = 'source_1'rnDELETE TOP(1000) depart WHERE id < @p_idrnreturn @@ROWCOUNTrnENDrnGOrnrnWHILE(@@ROWCOUNT=1000)rnEXECUTE P_Deleternprint @@ROWCOUNTrn[/code]rn存储过程要实现删除dept表里id小于node表中tablename为source_1的p_id的所有数据,循环执行存储过程直到删除完毕rn我的代码在循环部分有问题,求各位指点
VHDL第一次用,不知道怎么改错误,求大神指点
Error (10500): VHDL syntax error at Vhdl2.vhd(17) near text "€"; expecting "then"rnError (10500): VHDL syntax error at Vhdl2.vhd(17) near text ™rnError (10500): VHDL syntax error at Vhdl2.vhd(23) near text "if"; expecting "process"rnError: Quartus II 64-Bit Analysis & Synthesis was unsuccessful. 4 errors, 0 warningsrn Error: Peak virtual memory: 531 megabytesrn Error: Processing ended: Sat Dec 24 20:33:29 2016rn Error: Elapsed time: 00:00:02rn Error: Total CPU time (on all processors): 00:00:01rnError (293001): Quartus II Full Compilation was unsuccessful. 6 errors, 0 warningsrnrnrnlibrary ieee;rnuse ieee.std_logic_arith.all;rnuse ieee.std_logic_1164.all;rnuse ieee.std_logic_unsigned.all;rnentity ppt isrnport(clk : in std_logic;rn start : in std_logic;rn x : in std_logic;rn y : out std_logic);rnend ppt;rnarchitecture behav of askt isrnsignal q:integer range 0 to 3;rnsignal f:std_logic;rnbeginrnprocess(clk)rnbeginrnif clk'event and clk=’1’thenrn if start='0' then q<=0;rn elsif q<=1 then f<='1';q<=q+1;rn elsif q=3 then f<='0';q<=0;rn else f<='0';q<=q+1;rn end if;rnend if;rnend process;rny<=x and f;rnend behav;
在线的大侠帮忙啊,实在不知道怎么改!
站点放到服务器上出错了,我加了everyone权限的!rn操作系统是2003 SERVER,分区是NTFSrnhttp://phs.zg163.net/count/show.jpgrn
一个语法错误,不知道怎么改?帮忙呀?
with DataModule1.Table1 dorn beginrn if Locate('UserName',UserCB.Text,[loCaseInsensitive]) thenrnrn//错误显示: loCaseInsensitive 没有定义rn不知道是否要包含什么文件,还是什么的,书上是这样 的呀
菜鸟问题,大家帮忙!实在不知道怎么改!
public string texttohtml(string chr)rn rn if(chr==null)rn return "";rn chr=chr.Replace("<","<");rn chr=chr.Replace(">",">");rn chr=chr.Replace("\n"," ");rn chr=chr.Replace(" "," ");rn return(chr); rn rnrn public string changechr(string chr)rn rn if(chr==null)rn return "";rnrn if(isscript==0)rn rn chr = Regex.Replace(chr,@"[^\>]*)>(?[^\>]*)\",@"$2",RegexOptions.IgnoreCase);rn rn rn if( isubb == 1)rn rn chr = Regex.Replace(chr,@"\[url=(?[^\]]*)\](?[^\]]*)\[/url\]",@"$2",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[url\](?[^\]]*)\[/url\]",@"$1",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[email=(?[^\]]*)\](?[^\]]*)\[/email\]",@"$2",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[email\](?[^\]]*)\[/email\]",@"$1",RegexOptions.IgnoreCase);rnrn if(isflash==1)rn rn chr = Regex.Replace(chr,@"\[flash](?[^\]]*)\[/flash]",@"$1",RegexOptions.IgnoreCase);rn rn if(isimg==1)rn rn chr = Regex.Replace(chr,@"\[img](?[^\]]*)\[/img]",@"",RegexOptions.IgnoreCase);rn rn chr = Regex.Replace(chr,@"\[color=(?[^\]]*)\](?[^\]]*)\[/color\]",@"$2",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[face=(?[^\]]*)\](?[^\]]*)\[/face\]",@"$2",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[size=1\](?[^\]]*)\[/size\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[size=2\](?[^\]]*)\[/size\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[size=3\](?[^\]]*)\[/size\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[size=4\](?[^\]]*)\[/size\]",@"$1",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[align=(?[^\]]*)\](?[^\]]*)\[/align\]",@"$2",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[fly](?[^\]]*)\[/fly]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[move](?[^\]]*)\[/move]",@"$1",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[glow=(?[^\]]*),(?[^\]]*),(?[^\]]*)\](?[^\]]*)\[/glow\]",@" $4",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[shadow=(?[^\]]*),(?[^\]]*),(?[^\]]*)\](?[^\]]*)\[/shadow\]",@" $4",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[b\](?[^\]]*)\[/b\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[i\](?[^\]]*)\[/i\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[u\](?[^\]]*)\[/u\]",@"$1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[code\](?[^\]]*)\[/code\]",@" $1",RegexOptions.IgnoreCase);rnrn chr = Regex.Replace(chr,@"\[list\](?[^\]]*)\[/list\]",@" $1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[list=1\](?[^\]]*)\[/list\]",@" $1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[list=a\](?[^\]]*)\[/list\]",@" $1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[\*\](?[^\]]*)\[/\*\]",@" $1",RegexOptions.IgnoreCase);rn chr = Regex.Replace(chr,@"\[quote](?.*)\[/quote]",@"—— 以下是引用 —— $1—— 引用完毕 ——",RegexOptions.IgnoreCase);rn rn return(chr);rn rnrn public string[] splitstring(string oldrtring)rn rn if (oldrtring!="")rn rn char[] ch = '|';rn arrwordr=oldrtring.Split(ch);rn return(arrwordr);rn rn else rn rn return(null); rn rn rn public string adminck()rn rn rn if ( Session["au"] == "yes" )rn rn return("yes"); rn rn else rn rn return("Wrong"); rn rn rn编译时,if ( Session["au"] == "yes" )行出错:可能非有意的引用比较;若要获取值比较,请将左边转换为类型“string”,但加了又不行,帮忙看看!
老大们看下,不知道这个错误怎么改
/*rn*-----------------------------------------------------------------------rn* name: simple cat(cat.c)rn* Author : maskedmanrn* For example:cat [options] [files]rn*-----------------------------------------------------------------------rn*/ rn#include rn#include rn#include rn#include rn#include rn#define _memtchr memchrrn#define BUF_SIZE 0x200rn#define LIBSPEC _declspec (dllexport)rnLIBSPEC VOID PrintStrings (HANDLE, ...);rnLIBSPEC VOID PrintMsg (HANDLE, LPCTSTR);rnLIBSPEC VOID ReportError (LPCTSTR, DWORD, BOOL);rnstatic VOID CatFile (HANDLE,HANDLE);rnDWORD Options (int argc, LPCTSTR argv [], LPCTSTR Optstr, ...);rnVOID ReportError (LPCTSTR UserMessage, DWORD ExitCode,BOOL PrintErrorMsg);rnint _tmain (int argc,LPTSTR argv [])rnrn HANDLE hInFile,hStdIn=GetStdHandle (STD_INPUT_HANDLE);rn HANDLE hStdOut = GetStdHandle (STD_OUTPUT_HANDLE);rn BOOL DashS;rn int iArg, iFirstFile;rn iFirstFile = Options ( argc, argv, _T("s"), &DashS, NULL);rn if (iFirstFile==argc)rn CatFile( hStdIn, hStdOut);rn return 0;rn rn for (iArg = iFirstFile; iArg0 )rn ExitProcess (ExitCode);rn else rn return;rnrnrnrn出现rncat.obj : error LNK2001: unresolved external symbol _PrintStringsrncat.obj : error LNK2001: unresolved external symbol _PrintMsgrn希望老大们帮帮我