首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

*exe 已停止工作 Windows 正在检查该有关问题的解决方案

2012-08-27 
*.exe 已停止工作 Windows 正在检查该问题的解决方案 #include iostream.h// #include iostream// usi

*.exe 已停止工作 Windows 正在检查该问题的解决方案

 

#include <iostream.h>// #include <iostream>// using std::cout;// using std::endl;#include <stdio.h>/** ** hello ** hello ** h ** Aello ** Aello ** A **/int main(void){// cout << "hello, world\n";char *str1="hello";char *str2="hello, world\n";char *const ptr1 =str1;// 指针常量/** ** 正确 **/ printf("%s \n",str1);printf("%s \n",ptr1);printf("%c \n",*ptr1);/** ** Bus error(coredump)——HP-UX benz B.11.11 U 9000/800 2294287966 unlimited-user license ** *.exe 已停止工作 Windows 正在检查该问题的解决方案——VS2010 **  **///*ptr1 ='A';// 指针常量ptr1, 指向"hello"(文字常量(右值), 它的值不能被改变)/** ** 正确 **/char ca1[]="hello";char ca2[]="hello, world\n";char *const ptr2 =ca1;// 指针常量*ptr2 ='A'; printf("%s \n",ca1); printf("%s \n",ptr2); printf("%c \n",*ptr2);// 输出 Areturn 0;}


 

 

热点排行