<!DOCTYPE html>
<html lang="en">
	<head>
	
		<meta charset="utf-8" />
		
		<!--basic styles-->

		<link href="asset/css/bootstrap.css" rel="stylesheet" />
		<link rel="stylesheet" href="asset/css/dexter.min.css" />
		<link rel="stylesheet" href="asset/css/font-awesome.min.css" />
		<!--[if IE 7]>
			<link rel="stylesheet" href="asset/css/font-awesome-ie7.min.css">
		<![endif]-->

		<link rel="stylesheet" href="asset/css/prettify.css" />
		
		<script src="asset/js/jquery-2.0.3.min.js"></script>
		<!--[if IE]>
			<script src="asset/js/jquery.min.js"></script>
		<![endif]-->

		<script src="asset/js/prettify.js"></script>
		<script type="text/javascript">
			$(function() {
			
				window.prettyPrint && prettyPrint();
				$('#id-check-horizontal').removeAttr('checked').on('click', function(){
					$('#dt-list-1').toggleClass('dl-horizontal').prev().html(this.checked ? '&lt;dl class="dl-horizontal"&gt;' : '&lt;dl&gt;');
				});
			
			})
		</script>
		

	</head>
	<body>

		<div class="space-12"></div>
		<div class="table-grid-info table-grid-info-striped">
			
			<div class="table-grid-row">
				<div class="table-grid-label"> Checker Code</div>
				<div class="table-grid-value"><h5 class="header blue"><i class="fa fa-bug"></i>&nbsp;
					mismatchSize</h5>
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> Description </div>
				<div class="table-grid-value-highlight"><i class="fa fa-th"></i>&nbsp;
The given size is mismatching.
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> Severity </div>
				<div class="table-grid-value">
					Major
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> Detector / Bug Pattern </div>
				<div class="table-grid-value">
The given size is mismatching.
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> More Information </div>
				<div class="table-grid-value">
The given size is mismatching.
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> Bad Code </div>
				<div class="table-grid-value">
			<pre class="prettyprint linenums warning">
vector<classname*> object;
object.push_back(new classname2);

for(int i=0;i< object.size();i++)
{
....
}
</pre>
			</div>
			</div>
       
			<div class="table-grid-row">
				<div class="table-grid-label"> Good Code </div>
				<div class="table-grid-value">
			<pre class="prettyprint linenums correct">
vector<classname*> object;
object.push_back(new classname2);			
for (std::vector<int>::const_iterator i = v.begin(); i != v.end(); ++i)
{
    ...
}
/*
The problem is that If you're on a 32-bit machine where a signed int is 4 bytes,
it could be possible that the size of the vector could exceed the maximum quantity representable by that type. 
*/			
</pre>
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> CWE ID </div>
				<div class="table-grid-value">
				<a href="asset/CWE_ID.html" target="_blank">0 </a>
				</div>
			</div>

			<div class="table-grid-row">
				<div class="table-grid-label"> Code Review Asset </div>
				<div class="table-grid-value">
					N/A

				</div>
			</div>
			<div class="table-grid-row">
				<div class="table-grid-label"> URLs </div>
				<div class="table-grid-value"> <i class="fa fa-link"></i>&nbsp;
				
					<a  target="_blank" href="http://stackoverflow.com/questions/16387152/error-c4018-with-vector-size-in-c">
					http://stackoverflow.com/questions/16387152/error-c4018-with-vector-size-in-c
					</a> 
						
																
				</div>
			</div>
	</div>
	<div class="space-20"></div>
</body>
<html>