vector<int>	a(10,0);
	for(vector<int>::iterator itor=a.begin();itor!=a.end();itor++)
		*itor=1;
	
	/* *itor can't changed */
	for(vector<int>::const_iterator itor=a.begin();itor!=a.end();itor++)
		cout<<*itor;
	/* itor itself can't changed,but *itor is changeable */
	const vector<int>::iterator itor;
	
	bool singal;
	cin>>singal;

  计算数组长度

	unsigned a[]={1,2,3,4,5,6,7,8,9,0};
	cout<<sizeof(a)/sizeof(unsigned);

  

相关文章:

  • 2022-02-27
  • 2021-07-21
  • 2021-06-04
  • 2021-04-27
  • 2021-09-01
  • 2021-12-31
  • 2022-02-27
  • 2021-10-25
猜你喜欢
  • 2021-12-03
  • 2022-01-06
  • 2022-01-17
  • 2021-10-10
  • 2022-02-04
  • 2021-07-22
  • 2021-12-05
相关资源
相似解决方案