我AVPlayer在ios中写插件.我需要知道用户何时单击" 完成"按钮AVPlayerViewController(我想知道用户何时关闭视频)并且我无法访问AVPlayerViewController对象.我检查了事件,发现只有AVPlayer设置为0的速率属性,但在暂停情况下,速率设置为0.我怎么弄清楚这两种情况?谢谢大家.
我写这段代码:
运行时,行中发生错误
cout<<it2->first;
Run Code Online (Sandbox Code Playgroud)
test3.exe中0x00411edd处的未处理异常:0xC0000005:访问冲突读取位置0x00000004."
我有Visual Studio Express 2008和Boost 1_47_0;
这是我的完整代码:
#include "stdafx.h"
#include <iostream>
#include <boost/unordered_map.hpp>
using namespace std;
typedef boost::unordered_map<int,int > MAP;
MAP map2;
boost::unordered_map<int,int>::iterator it2;
void gen_random(char *s ,char *p,int* r,const int len);
void inline insert2(int i_key,int i_value);
void print();
//-----------main------------------------------------
void main()
{
char* s_key=new char[8];
char* s_value=new char[8];
int i_value=0, size_random=8;
for(int i=0;i<12;i++)
{
gen_random(s_key,s_value,&i_value,size_random);
insert2(i_value,i_value);
}
print();
int a;
std::cin>>a;
}
//-------------end main--------------------------------
//--------my function ---------------------------
//-------random--------------
void gen_random(char* s,char* p,int *r, const int len) …Run Code Online (Sandbox Code Playgroud)