早教吧 育儿知识 作业答案 考试题库 百科 知识分享

VC中的cannotexecuteprogram是什么意思我的运行程序是这个#include<iostream.h>intmain(){char*s1="hello";char*s2="123";chara[20];strcpy(a,s1);cout<<(strcmp(a,s1)==0?"":"not")<<"equal"<<endl;cout<<strc

题目详情
VC中的cannotexecuteprogram是什么意思我的运行程序是这个 #include<iostream.h> intmain() { char*s1="hello"; char*s2="123"; chara[20]; strcpy(a,s1); cout<<(strcmp(a,s1)==0?"":"not")<<"equal"<<endl; cout<<strcat(a,s2)<<endl; cout<<strrev(a)<<endl; cout<<strset(a,'c')<<endl; cout<<(strstr(s1,"ell")?"":"not")<<"found"<<endl; cout<<(strchr(s1,'c')?"":"not")<<"found"<<endl; }
▼优质解答
答案和解析
程序编译通过,仅说明程序本身无语法错误,并不意味着程序能够顺利的执行。3内存操作的问题,用OpenCV进行图像处理时,大多是用指针进行操作,这涉及到内存操作的问题。比如:一指针已指向内存,但是没有赋值,也就是为空,当在另一处对该指针进行操作时,就会出错。