您当前的位置: 首页 > 

txwtech

暂无认证

  • 2浏览

    0关注

    813博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

xstring-Expression: Line: 1682 -string subscript out

txwtech 发布时间:2019-11-10 17:21:25 ,浏览量:2

 

 

--------------------------- Microsoft Visual C++ Runtime Library --------------------------- Debug Assertion Failed!

 

Program: C:\Windows\SYSTEM32\MSVCP140D.dll File: d:\program files (x86)\microsoft visual studio 14.0\vc\include\xstring Line: 1682

 

Expression: string subscript out of range

 

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

 

(Press Retry to debug the application)

 

--------------------------- 中止(A)   重试(R)   忽略(I)   ---------------------------

//for ( index = 0; index != sizeof(str1); ++index)  //sizeof是查看字节的,写法错误。       for ( index = 0; index != str1.size(); ++index)     {   if (ispunct(str1[index]))    str1_sum += 1;  }
#include 
#include 


int main()
{
	using namespace std;
	string str1;
	int str1_sum(0);
	
	cout             
关注
打赏
1665060526
查看更多评论
0.0627s