<!DOCTYPE html>
	<html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
	<head>
<title>&#91;C++&#93;. Kiểu Pair</title>
<meta name="description" content="&#91;C++&#93;. Kiểu Pair - Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;tinhocdct.xyz&#x002F;savefile&#x002F;hoat-dong-chuyen-mon&#x002F;c-kieu-pair-446.html">
<meta name="author" content="TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG">
<meta name="copyright" content="TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG [webmaster@tinhocdct.xyz]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="&#91;C++&#93;. Kiểu Pair">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;tinhocdct.xyz&#x002F;savefile&#x002F;hoat-dong-chuyen-mon&#x002F;c-kieu-pair-446.html">
<meta property="og:site_name" content="TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG">
<meta property="og:url" content="https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-kieu-pair-446.html">
<link rel="shortcut icon" href="https://tinhocdct.xyz/favicon.ico">
<link rel="canonical" href="https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-kieu-pair-446.html">
<link rel="alternate" href="https://tinhocdct.xyz/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/tin-tuc/" title="Tin Tức - TIN TỨC" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/thong-cao-bao-chi/" title="Tin Tức - THÔNG BÁO" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/ban-tin-noi-bo/" title="Tin Tức - BẢN TIN NỘI BỘ" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/tin-cong-nghe/" title="Tin Tức - CÔNG NGHỆ - KHOA HỌC" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/thu-thuat/" title="Tin Tức - THỦ THUẬT" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/tien-ich/" title="Tin Tức - TIỆN ÍCH" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/ai/" title="Tin Tức - AI" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/khoa-hoc/" title="Tin Tức - KHOA HỌC" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/hoat-dong-chuyen-mon/" title="Tin Tức - HOẠT ĐỘNG CHUYÊN MÔN" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/hoat-dong-cong-doan/" title="Tin Tức - CÔNG ĐOÀN" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/hoat-dong-doan-the/" title="Tin Tức - ĐOÀN THỂ" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/tuyen-sinh-huong-nghiep/" title="Tin Tức - TUYỂN SINH - HƯỚNG NGHIỆP" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/tuyen-sinh-2025/" title="Tin Tức - TUYỂN SINH 2025" type="application/rss+xml">
<link rel="alternate" href="https://tinhocdct.xyz/rss/lich-cong-tac-tuan/" title="Tin Tức - Lịch công tác tuần" type="application/rss+xml">
<link rel="preload" as="script" href="https://tinhocdct.xyz/assets/js/jquery/jquery.min.js">
<link rel="preload" as="script" href="https://tinhocdct.xyz/assets/js/language/vi.js">
<link rel="preload" as="script" href="https://tinhocdct.xyz/assets/js/global.js">
<link rel="preload" as="script" href="https://tinhocdct.xyz/themes/default/js/news.js">
<link rel="preload" as="script" href="https://tinhocdct.xyz/themes/default/js/main.js">
<link rel="preload" as="script" href="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1816161148536198">
<link rel="preload" as="script" href="https://tinhocdct.xyz/themes/default/js/bootstrap.min.js">
<link rel="StyleSheet" href="https://tinhocdct.xyz/assets/css/font-awesome.min.css">
<link rel="StyleSheet" href="https://tinhocdct.xyz/themes/default/css/bootstrap.non-responsive.css">
<link rel="StyleSheet" href="https://tinhocdct.xyz/themes/default/css/style.css">
<link rel="StyleSheet" href="https://tinhocdct.xyz/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://tinhocdct.xyz/themes/default/css/news.css">
<style>
	body{background: #fff;}
</style>
	</head>
	<body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG</h2>
		<p class="pull-right"><a title="TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG" href="https://tinhocdct.xyz/">https://tinhocdct.xyz</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>&#91;C++&#93;. Kiểu Pair</h1>
		<ul class="list-inline">
			<li>Thứ sáu - 21/02/2025 03:39</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
			Pair trong C++ là một kiểu container lưu trữ dữ liệu theo cặp đem lại nhiều sự tiện lợi khi bạn cần lưu trữ dữ liệu theo cặp, ví dụ như : Tọa độ Oxy, thời gian bắt đầu và kết thúc của một công việc, đỉnh đầu và cuối của một cạnh trên đồ thị...
		</div>
				<div class="imghome">
			<img alt="kiểu pair trong c++" src="https://tinhocdct.xyz/uploads/news/2025_02/kieu-pair-trong-c.png" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span data-mce-style="color: rgb(53, 152, 219); font-size: 14pt;" style="font-size:14pt"><span style="box-sizing:border-box"><span style="color:rgb(53, 152, 219);"><strong style="box-sizing:border-box; font-weight:bolder">1. Kiểu Pair</strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">pair&nbsp;</span></span>nằm trong thư viện&nbsp;<span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">&quot;utility&quot;&nbsp;</span></span>được sử dụng để kết hợp 2 kiểu dữ liệu với nhau, nó cung cấp cách lưu trữ 2 giá trị đi kèm nhau nhưng chỉ sử dụng 1 biến.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial">Nhìn chung pair giúp lưu trữ dữ liệu theo cặp và có những đặc điểm sau :&nbsp;</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>
<ul style="box-sizing:border-box; margin-bottom:10px; color:rgb(82, 87, 92); font-family:&#039;Be Vietnam Pro&#039;, sans-serif; font-size:15px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; widows:2; word-spacing:0px; -webkit-text-stroke-width:0px; white-space:normal; text-decoration-thickness:initial; text-decoration-style:initial; text-decoration-color:initial">
	<li style="box-sizing:border-box">Phần tử thứ nhất của pair được gọi là&nbsp;<span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">first</span></span>, phần tử thứ 2 của pair được gọi là&nbsp;<span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">second</span></span></li>
	<li style="box-sizing:border-box">Bạn có thể so sánh, gán, copy pair như kiểu dữ liệu bạn thường gặp</li>
	<li style="box-sizing:border-box">Để truy cập vào phần tử thứ nhất và thứ 2 trong pair ta sử dụng toán tử dấu chấm</li>
</ul>
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial">Cú pháp khai báo :</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
&nbsp;
<pre>
<code class="language-cpp">//Cách 1 : Giá trị của first và second là mặc định
pair&lt;first_data_type, second_data_type&gt; pair_name;

//Cách 2 : Giá trị của first là value1, second là value2
pair&lt;first_data_type, second_data_type&gt; pair_name = make_pair(value1, value2)

//Cách 3 : Giá trị của first là value1, second là value2
pair&lt;first_data_type, second_data_type&gt; pair_name(value1, value2)

//Cách 4 : Giá trị của first là value1, second là value2
pair&lt;first_data_type, second_data_type&gt; pair_name = {value1, value2}</code></pre>
<br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial">Thành phần first và second của pair có thể là các kiểu dữ liệu thường gặp như int, float, double, long long,char... hay cũng có thể chính là một pair khác. Ngoài ra nó còn có thể là các kiểu phức tạp hơn như string, vector&lt;&gt;, set, object... tuy nhiên nhưng kiến thức này bạn chưa gặp nên tạm thời bỏ qua.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">Ví dụ 1:&nbsp;<span data-mce-style="color: rgb(0, 0, 0);" style="box-sizing:border-box"><span style="color:rgb(0, 0, 0);">Các kiểu khai báo pair</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>

<pre>
<code class="language-cpp">#include &lt;iostream&gt;
#include &lt;utility&gt;

using namespace std;

int main(){
    pair&lt;int, int&gt; a = make_pair(28, 100);
    cout &lt;&lt; a.first &lt;&lt; &#039; &#039; &lt;&lt; a.second &lt;&lt; endl;

    pair&lt;char, int&gt; b = {&#039;@&#039;, 28};
    cout &lt;&lt; b.first &lt;&lt; &#039; &#039; &lt;&lt; b.second &lt;&lt; endl;

    pair&lt;char, char&gt; c(&#039;#&#039;, &#039;$&#039;);
    cout &lt;&lt; c.first &lt;&lt; &#039; &#039; &lt;&lt; c.second &lt;&lt; endl;
    return 0;
}</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Output :&nbsp;</span><br  />
&nbsp;
<pre>
<code>28 100
@ 28
# $</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Ví dụ 2 :</span> pair lồng nhau<br  />
&nbsp;
<pre>
<code class="language-cpp">#include &lt;iostream&gt;
#include &lt;utility&gt;

using namespace std;

int main(){
    pair&lt;int, pair&lt;char, int&gt; &gt; p1 = make_pair(28, make_pair(&#039;@&#039;, 100));
    cout &lt;&lt; p1.first &lt;&lt; endl;
    cout &lt;&lt; p1.second.first &lt;&lt; &#039; &#039; &lt;&lt; p1.second.second &lt;&lt; endl;

    pair&lt;pair&lt;int, int&gt;, pair&lt;int, int&gt;&gt; p2 = {{10, 20}, {30, 40}};
    cout &lt;&lt; p2.first.first &lt;&lt; &#039; &#039; &lt;&lt; p2.first.second &lt;&lt; endl;
    cout &lt;&lt; p2.second.first &lt;&lt; &#039; &#039; &lt;&lt; p2.second.second &lt;&lt; endl;
    return 0;
}</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Output :&nbsp;</span><br  />
&nbsp;
<pre>
<code>28
@ 100
10 20
30 40</code></pre>
<br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span data-mce-style="color: rgb(53, 152, 219); font-size: 14pt;" style="font-size:14pt"><span style="box-sizing:border-box"><span style="color:rgb(53, 152, 219);"><strong style="box-sizing:border-box; font-weight:bolder">2. Toán Tử Với Pair</strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial">Bạn có thể sử dụng các toán tử so sánh, gán với kiểu pair này.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span data-mce-style="color: rgb(230, 126, 35);" style="box-sizing:border-box"><span style="color:rgb(230, 126, 35);">Ví dụ 1</span></span>&nbsp;. Toán gán sẽ gán giá trị của first và second của 2 pair cho nhau</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br  />
<span style="font-size:15px"><span style="box-sizing:border-box"><span style="color:rgb(82, 87, 92);"><span style="font-family:&#039;Be Vietnam Pro&#039;, sans-serif"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="widows:2"><span style="word-spacing:0px"><span style="white-space:normal"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial">Trong ví dụ này mình demo với kiểu string - chuỗi ký tự trong C++</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>

<pre>
<code class="language-cpp">#include &lt;iostream&gt;
#include &lt;utility&gt;

using namespace std;

int main(){
    pair&lt;string, int&gt; p = make_pair(&quot;28tech&quot;, 28);
    pair&lt;string, int&gt; p1 = p;
    cout &lt;&lt; p1.first &lt;&lt; &#039; &#039; &lt;&lt; p1.second &lt;&lt; endl;
    return 0;
}</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Output :&nbsp;</span><br  />
&nbsp;
<pre>
<code>28tech 28</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Ví dụ 2 :</span> So sánh 2 pair sẽ so sánh giá trị first sau đó so sánh giá trị second<br  />
&nbsp;
<pre>
<code class="language-cpp">#include &lt;iostream&gt;
#include &lt;utility&gt;

using namespace std;

int main(){
    pair&lt;int, int&gt; p1 = {10, 20};
    pair&lt;int, int&gt; p2 = {10, 21};
    pair&lt;int, int&gt; p3 = {5, 35};
    cout &lt;&lt; boolalpha &lt;&lt; (p1 == p2) &lt;&lt; endl;
    cout &lt;&lt; boolalpha &lt;&lt; (p1 != p2) &lt;&lt; endl;
    cout &lt;&lt; boolalpha &lt;&lt; (p1 &lt; p2) &lt;&lt; endl;
    cout &lt;&lt; boolalpha &lt;&lt; (p1 &gt; p3) &lt;&lt; endl;
    return 0;
}</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Output :&nbsp;</span><br  />
&nbsp;
<pre>
<code>false
true
true
true</code></pre>
<br  />
<span style="color:rgb(231, 76, 60);">Ví dụ 3 :</span> swap 2 pair với nhau bằng hàm swap<br  />
&nbsp;
<pre>
<code class="language-cpp">#include &lt;iostream&gt;
#include &lt;utility&gt;

using namespace std;

int main(){
    pair&lt;int, int&gt; p1 = {10, 20};
    pair&lt;int, int&gt; p2 = {30, 40};
    cout &lt;&lt; &quot;Ban dau : \n&quot;;
    cout &lt;&lt; &quot;p1 = {&quot; &lt;&lt; p1.first &lt;&lt; &quot;, &quot; &lt;&lt; p1.second &lt;&lt; &quot;}\n&quot;;
    cout &lt;&lt; &quot;p2 = {&quot; &lt;&lt; p2.first &lt;&lt; &quot;, &quot; &lt;&lt; p2.second &lt;&lt; &quot;}\n&quot;;
    p1.swap(p2);
    cout &lt;&lt; &quot;Sau khi swap : \n&quot;;
    cout &lt;&lt; &quot;p1 = {&quot; &lt;&lt; p1.first &lt;&lt; &quot;, &quot; &lt;&lt; p1.second &lt;&lt; &quot;}\n&quot;;
    cout &lt;&lt; &quot;p2 = {&quot; &lt;&lt; p2.first &lt;&lt; &quot;, &quot; &lt;&lt; p2.second &lt;&lt; &quot;}\n&quot;;
    return 0;
}</code></pre>
<br  />
Output :&nbsp;<br  />
&nbsp;
<pre>
<code>Ban dau : 
p1 = {10, 20}
p2 = {30, 40}
Sau khi swap : 
p1 = {30, 40}
p2 = {10, 20}</code></pre>
&nbsp;

<div><a href="https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-nhap-xuat-voi-cin-va-cout-445.html" target="_blank"><img alt="bai truoc" height="35" src="https://tinhocdct.xyz/uploads/news/2025_02/bai-truoc.png" width="120" /></a>&nbsp;<a href="https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-toan-tu-operator-462.html"><img alt="bai tiep" height="35" src="https://tinhocdct.xyz/uploads/news/2025_02/bai-tiep.png" style="float:right" width="120" /></a></div>
&nbsp;
		</div>
				<div id="author">
						<p>
				<strong>Tác giả bài viết:</strong>
				Thanh Sơn
			</p>
						<p>
				<strong>Nguồn tin:</strong>
				blog.28tech.com.vn
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-kieu-pair-446.html" title="&#91;C++&#93;. Kiểu Pair">https://tinhocdct.xyz/hoat-dong-chuyen-mon/c-kieu-pair-446.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; TỔ TIN HỌC TRƯỜNG THPT ĐỖ CÔNG TƯỜNG
		</div>
		<div id="contact">
			<a href="mailto:webmaster@tinhocdct.xyz">webmaster@tinhocdct.xyz</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://tinhocdct.xyz/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<script src="https://tinhocdct.xyz/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_is_recaptcha=0;</script>
<script src="https://tinhocdct.xyz/assets/js/language/vi.js"></script>
<script src="https://tinhocdct.xyz/assets/js/global.js"></script>
<script src="https://tinhocdct.xyz/themes/default/js/news.js"></script>
<script src="https://tinhocdct.xyz/themes/default/js/main.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1816161148536198"
     crossorigin="anonymous"></script>
<script src="https://tinhocdct.xyz/themes/default/js/bootstrap.min.js"></script>
</body>
</html>