{"id":9354,"date":"2023-10-20T20:59:57","date_gmt":"2023-10-20T13:59:57","guid":{"rendered":"https:\/\/teky.edu.vn\/blog\/?p=9354"},"modified":"2023-10-28T09:13:41","modified_gmt":"2023-10-28T02:13:41","slug":"con-tro-trong-c-2","status":"publish","type":"post","link":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/","title":{"rendered":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf"},"content":{"rendered":"\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;9354&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;10&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (10 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 142.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            5\/5 - (10 b\u00ecnh ch\u1ecdn)    <\/div>\n    <\/div>\n<p style=\"text-align: justify;\"><em><strong>Con tr\u1ecf hay c\u00f2n \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 Pointer trong C++ l<\/strong>\u00e0 m\u1ed9t ph\u1ea7n ki\u1ebfn th\u1ee9c kh\u00e1 kh\u00f3. Tuy nhi\u00ean c\u0169ng kh\u00f4ng k\u00e9m ph\u1ea7n th\u00fa v\u1ecb. N\u1ebfu b\u1ea1n n\u1eafm ch\u1eafc c\u00e1ch s\u1eed d\u1ee5ng con tr\u1ecf trong C++ th\u00ec s\u1ebd d\u1ec5 d\u00e0ng th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c cao c\u1ea5p c\u00f9ng b\u1ed9 nh\u1edb. Vi\u1ec7c n\u00e0y l\u00e0 v\u00f4 c\u00f9ng c\u1ea7n thi\u1ebft n\u1ebfu m\u1ee5c ti\u00eau c\u1ee7a b\u1ea1n l\u00e0 tr\u1edf th\u00e0nh m\u1ed9t l\u1eadp tr\u00ecnh vi\u00ean chuy\u00ean nghi\u1ec7p. V\u1ed1n d\u0129 c\u00e1c th\u00f4ng tin xung quanh con tr\u1ecf C++ r\u1ea5t r\u1ed9ng l\u1edbn. V\u00ec th\u1ebf, trong b\u00e0i vi\u1ebft n\u00e0y, Teky s\u1ebd \u0111\u1ec1 c\u1eadp nhanh \u0111\u1ebfn c\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n cho nh\u1eefng b\u1ea1n ch\u01b0a t\u1eebng \u0111\u1ecdc qua v\u1ec1<strong> con tr\u1ecf C++<\/strong> tr\u01b0\u1edbc \u0111\u00e2y. H\u00e3y c\u00f9ng b\u1eaft \u0111\u1ea7u th\u00f4i.<\/em><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung <\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Khai_niem_cua_con_tro_trong_C\" >Kh\u00e1i ni\u1ec7m c\u1ee7a con tr\u1ecf trong C++<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Tim_hieu_kien_truc_may_tinh\" >T\u00ecm hi\u1ec3u ki\u1ebfn tr\u00fac m\u00e1y t\u00ednh<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Cap_bo_nho_trong_C\" >C\u1ea5p b\u1ed9 nh\u1edb trong C++<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Bien_con_tro_trong_C\" >Bi\u1ebfn con tr\u1ecf trong C++<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Cach_su_dung_con_tro_trong_C\" >C\u00e1ch s\u1eed d\u1ee5ng con tr\u1ecf trong C++<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Khai_bao_con_tro_C\" >Khai b\u00e1o con tr\u1ecf C++<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Gan_gia_tri_cho_con_tro\" >G\u00e1n gi\u00e1 tr\u1ecb cho con tr\u1ecf<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Truy_cap_vao_bien_duoc_con_tro_tro_toi\" >Truy c\u1eadp v\u00e0o bi\u1ebfn \u0111\u01b0\u1ee3c con tr\u1ecf tr\u1ecf t\u1edbi<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Ket_luan\" >K\u1ebft lu\u1eadn<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Tim_Hieu_Teky_Hoc_Vien_Cong_Nghe_Tre_Hang_Dau_Viet_Nam\" >T\u00ecm Hi\u1ec3u Teky H\u1ecdc Vi\u1ec7n C\u00f4ng Ngh\u1ec7 Tr\u1ebb H\u00e0ng \u0110\u1ea7u Vi\u1ec7t Nam<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Day_la_chuong_trinh_khong_chi_trang_bi_kien_thuc_lap_trinh_ma_con_ren_luyen_nhom_ky_nang_4Cs_Tre_se_duoc\" >\u0110\u00e2y l\u00e0 ch\u01b0\u01a1ng tr\u00ecnh kh\u00f4ng ch\u1ec9 trang b\u1ecb ki\u1ebfn th\u1ee9c l\u1eadp tr\u00ecnh m\u00e0 c\u00f2n r\u00e8n luy\u1ec7n nh\u00f3m k\u1ef9 n\u0103ng 4Cs. Tr\u1ebb s\u1ebd \u0111\u01b0\u1ee3c:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#Lien_he_ngay_hoc_vien_cong_nghe_sang_tao_TEKY_de_duoc_tu_van_khoa_hoc\" >Li\u00ean h\u1ec7 ngay h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 s\u00e1ng t\u1ea1o TEKY \u0111\u1ec3 \u0111\u01b0\u1ee3c t\u01b0 v\u1ea5n kh\u00f3a h\u1ecdc:<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Khai_niem_cua_con_tro_trong_C\"><\/span>Kh\u00e1i ni\u1ec7m c\u1ee7a con tr\u1ecf trong C++<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Tim_hieu_kien_truc_may_tinh\"><\/span>T\u00ecm hi\u1ec3u ki\u1ebfn tr\u00fac m\u00e1y t\u00ednh<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">\u0110\u1ec3 hi\u1ec3u \u0111\u01b0\u1ee3c kh\u00e1i ni\u1ec7m c\u1ee7a con tr\u1ecf trong C++, ta c\u1ea7n b\u1eaft \u0111\u1ea7u v\u1edbi c\u1ea5u tr\u00fac c\u1ee7a m\u00e1y t\u00ednh tr\u01b0\u1edbc, c\u1ee5 th\u1ec3 l\u00e0 b\u1ed9 nh\u1edb, hay c\u00f2n g\u1ecdi l\u00e0 RAM. RAM l\u00e0 t\u00ean vi\u1ebft t\u1eaft c\u1ee7a Random Access Memory. RAM \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng nh\u01b0 m\u1ed9t b\u1ed9 nh\u1edb t\u1ea1m th\u1eddi \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c d\u1eef li\u1ec7u trong \u0111i\u1ec1u ki\u1ec7n \u0111\u01b0\u1ee3c cung c\u1ea5p \u0111i\u1ec7n. N\u1ebfu RAM b\u1ecb ng\u1eaft \u0111i\u1ec7n, n\u00f3 s\u1ebd kh\u00f4ng th\u1ec3 ho\u1ea1t \u0111\u1ed9ng \u0111\u01b0\u1ee3c n\u1eefa. RAM \u0111\u01b0\u1ee3c c\u1ea5u t\u1ea1o n\u00ean t\u1eeb r\u1ea5t nhi\u1ec1u \u00f4 nh\u1edb. M\u1ed7i \u00f4 c\u00f3 k\u00edch th\u01b0\u1edbc l\u00e0 1 byte = 8 bit v\u00e0 s\u1edf h\u1eefu m\u1ed9t \u0111\u1ecba ch\u1ec9 duy nh\u1ea5t. C\u00e1c \u00f4 nh\u1edb \u0111\u01b0\u1ee3c \u0111\u00e1nh s\u1ed1 b\u1eaft \u0111\u1ea7u t\u1eeb 0 tr\u1edf \u0111i.<\/p>\n<figure id=\"attachment_9357\" aria-describedby=\"caption-attachment-9357\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9357\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c-co-nhung-lien-quan-den-gi.jpg\" alt=\"Con tr\u1ecf trong C++ c\u00f3 nh\u1eefng li\u00ean quan g\u00ec?\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c-co-nhung-lien-quan-den-gi.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c-co-nhung-lien-quan-den-gi-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9357\" class=\"wp-caption-text\">Con tr\u1ecf trong C++ c\u00f3 nh\u1eefng li\u00ean quan g\u00ec?<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">M\u1ed7i ki\u1ec3u d\u1eef li\u1ec7u l\u1ea1i c\u00f3 k\u00edch th\u01b0\u1edbc kh\u00e1c nhau. Ch\u00ednh v\u00ec th\u1ebf, kh\u00f4ng ph\u1ea3i ki\u1ec3u d\u1eef li\u1ec7u n\u00e0o c\u0169ng n\u1eb1m g\u1ecdn trong m\u1ed9t \u00f4 nh\u1edb \u0111\u01b0\u1ee3c. Ta bi\u1ebft r\u1eb1ng \u0111\u1ecba ch\u1ec9 c\u1ee7a bi\u1ebfn d\u1eef li\u1ec7u ch\u00ednh l\u00e0 \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 nh\u1edb n\u00f3 n\u1eb1m trong. V\u1eady n\u1ebfu v\u00ed d\u1ee5 nh\u01b0 ki\u1ec3u int chi\u1ebfm t\u1edbi 4 \u00f4 nh\u1edb th\u00ec \u0111\u1ecba ch\u1ec9 c\u1ee7a n\u00f3 l\u00e0 g\u00ec? Khi m\u1ed9t bi\u1ebfn chi\u1ebfm nhi\u1ec1u \u00f4 nh\u1edb, \u0111\u1ecba ch\u1ec9 c\u1ee7a n\u00f3 l\u00e0 \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 nh\u1edb \u0111\u1ea7u ti\u00ean trong chu\u1ed7i c\u00e1c \u00f4 nh\u1edb li\u1ec1n k\u1ec1 nhau.<\/p>\n<p style=\"text-align: justify;\">Khi tr\u00ecnh bi\u00ean d\u1ecbch code ho\u1ea1t \u0111\u1ed9ng, n\u00f3 s\u1ebd d\u00e0nh ri\u00eang m\u1ed9t v\u00f9ng \u0111\u1ec3 ghi nh\u1edb c\u00e1c bi\u1ebfn. \u0110\u1ecba ch\u1ec9 c\u1ee7a bi\u1ebfn l\u00e0 \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 nh\u1edb \u0111\u1ea7u ti\u00ean trong chu\u1ed7i li\u1ec1n k\u1ec1. Khi \u0111\u01b0\u1ee3c g\u1ecdi t\u00ean, n\u00f3 s\u1ebd t\u1ef1 truy xu\u1ea5t \u0111\u1ebfn \u0111\u1ecba ch\u1ec9 th\u00edch h\u1ee3p. C\u00e1c bi\u1ebfn kh\u00e1c nhau kh\u00f4ng nh\u1ea5t thi\u1ebft ph\u1ea3i li\u1ec1n k\u1ec1 nhau.<\/p>\n<p>&gt;&gt;&gt; Xem th\u00eam : <a href=\"https:\/\/teky.edu.vn\/blog\/react-native-la-gi\/\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;React Native l\u00e0 g\u00ec? \u0110i\u1ec3m m\u1ea1nh v\u00e0 \u0111i\u1ec3m y\u1ebfu c\u1ee7a React Native&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4481,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">React Native l\u00e0 g\u00ec? \u0110i\u1ec3m m\u1ea1nh v\u00e0 \u0111i\u1ec3m y\u1ebfu c\u1ee7a React Native<\/span><\/a><\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Cap_bo_nho_trong_C\"><\/span>C\u1ea5p b\u1ed9 nh\u1edb trong C++<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Khi ta ti\u1ebfn h\u00e0nh khai b\u00e1o t\u00ean v\u00e0 v\u00f9ng nh\u1edb c\u1ed1 \u0111\u1ecbnh cho m\u1ed9t bi\u1ebfn, n\u00f3 \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 bi\u1ebfn t\u0129nh hay bi\u1ebfn \u0111\u01b0\u1ee3c c\u1ea5p ph\u00e1t t\u0129nh. V\u00ec n\u00f3 g\u1eafn li\u1ec1n v\u1edbi v\u00f9ng nh\u1edb c\u1ed1 \u0111\u1ecbnh n\u00ean trong qu\u00e1 tr\u00ecnh ch\u01b0\u01a1ng tr\u00ecnh \u0111\u01b0\u1ee3c th\u1ef1c thi kh\u00f4ng th\u1ec3 t\u00e1c \u0111\u1ed9ng l\u00ean n\u00f3 \u0111\u01b0\u1ee3c. T\u00e1c \u0111\u1ed9ng \u1edf \u0111\u00e2y bao g\u1ed3m x\u00f3a \u0111i v\u00e0 c\u1ea3 thay \u0111\u1ed5i k\u00edch th\u01b0\u1edbc. T\u1ea5t c\u1ea3 nh\u1eefng \u0111i\u1ec1u n\u00e0y ch\u1ec9 c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n khi ch\u01b0\u01a1ng tr\u00ecnh k\u1ebft th\u00fac.<\/p>\n<p><a href=\"https:\/\/lotrinhlaptrinh.teky.vn\/?utm_id=ContentBlog&amp;utm_medium=Click_Blog&amp;utm_source=ContentBlog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22416\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2023\/10\/dang-ky-lap-trinh-teky.gif\" alt=\"dang-ky-lap-trinh\" width=\"600\" height=\"314\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">V\u00ec th\u1ebf, n\u00f3 g\u00e2y phi\u1ec1n ph\u1ee9c trong kh\u00e1 nhi\u1ec1u tr\u01b0\u1eddng h\u1ee3p. Khi m\u1ed9t bi\u1ebfn tr\u1edf n\u00ean v\u00f4 d\u1ee5ng ho\u1eb7c b\u00e0nh tr\u01b0\u1edbng qu\u00e1 m\u1ee9c m\u00e0 ta kh\u00f4ng th\u1ec3 x\u00f3a v\u00e0 ch\u1ec9nh s\u1eeda n\u00f3 th\u00ec s\u1ebd g\u00e2y n\u00ean chi\u1ebfm d\u1ee5ng b\u1ed9 nh\u1edb v\u00e0 l\u00e3ng ph\u00ed t\u00e0i nguy\u00ean. Gi\u1ea3i ph\u00e1p trong tr\u01b0\u1eddng h\u1ee3p n\u00e0y ch\u00ednh l\u00e0 bi\u1ebfn \u0111\u01b0\u1ee3c ho\u1eb7c bi\u1ebfn \u0111\u01b0\u1ee3c c\u1ea5p ph\u00e1t \u0111\u1ed9ng trong C++.<\/p>\n<p style=\"text-align: justify;\">Bi\u1ebfn \u0111\u1ed9ng l\u00e0 m\u1ed9t ki\u1ec3u d\u1eef li\u1ec7u \u0111\u00e3 \u0111\u01b0\u1ee3c \u0111\u1ecbnh ngh\u0129a. N\u00f3 c\u00f3 t\u00ean nh\u01b0ng kh\u00f4ng \u0111\u01b0\u1ee3c khai b\u00e1o bi\u1ebfn. Bi\u1ebfn \u0111\u1ed9ng s\u1ebd \u0111\u01b0\u1ee3c c\u1ea5p ph\u00e1t m\u1ed9t v\u00f9ng nh\u1edb trong RAM, c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng khi c\u00f3 ngu\u1ed3n \u0111i\u1ec7n v\u00e0 ng\u01b0\u1ee3c l\u1ea1i, kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng khi kh\u00f4ng c\u00f3 ngu\u1ed3n \u0111i\u1ec7n. Bi\u1ebfn \u0111\u1ed9ng s\u1ebd \u0111\u01b0\u1ee3c \u0111i\u1ec1u khi\u1ec3n b\u1eb1ng con tr\u1ecf trong C++.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Bien_con_tro_trong_C\"><\/span>Bi\u1ebfn con tr\u1ecf trong C++<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">B\u1ea3n th\u00e2n m\u1ed9t con tr\u1ecf trong C++ l\u00e0 m\u1ed9t bi\u1ebfn, v\u1eady n\u00ean n\u00f3 ch\u1ee9a \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 nh\u1edb \u0111\u1ea7u ti\u00ean trong v\u00f9ng nh\u1edb. Con tr\u1ecf C++ c\u00f3 th\u1ec3 ch\u1ee9a \u0111\u1ecba ch\u1ec9 c\u1ee7a c\u1ea3 bi\u1ebfn t\u0129nh l\u1eabn bi\u1ebfn \u0111\u1ed9ng. Tuy nhi\u00ean, nh\u01b0 \u0111\u00e3 n\u00f3i \u1edf tr\u00ean, bi\u1ebfn \u0111\u1ed9ng kh\u00f4ng c\u00f3 t\u00ean, v\u00ec th\u1ebf con tr\u1ecf C++ s\u1ebd ch\u1ecbu tr\u00e1ch nhi\u1ec7m qu\u1ea3n l\u00fd bi\u1ebfn \u0111\u1ed9ng \u0111\u00f3. Khi \u0111\u00f3 ta n\u00f3i, con tr\u1ecf n\u00e0y tr\u1ecf \u0111\u1ebfn bi\u1ebfn kia ho\u1eb7c con tr\u1ecf n\u00e0y tham chi\u1ebfu \u0111\u1ebfn v\u00f9ng nh\u1edb kia. M\u1ed7i con tr\u1ecf ch\u1ee9a m\u1ed9t \u0111\u1ecba ch\u1ec9 kh\u00e1c nhau n\u00ean ch\u00fang c\u0169ng c\u00f3 k\u00edch th\u01b0\u1edbc kh\u00e1c nhau.<\/p>\n<figure id=\"attachment_9359\" aria-describedby=\"caption-attachment-9359\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9359\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/dung-con-tro-c-khong-don-gian.jpg\" alt=\"D\u00f9ng con tr\u1ecf C++ kh\u00f4ng \u0111\u01a1n gi\u1ea3n\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/dung-con-tro-c-khong-don-gian.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/dung-con-tro-c-khong-don-gian-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9359\" class=\"wp-caption-text\">D\u00f9ng con tr\u1ecf C++ kh\u00f4ng \u0111\u01a1n gi\u1ea3n<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">Khi l\u00e0m vi\u1ec7c v\u1edbi con tr\u1ecf C++, ta kh\u00f4ng th\u1ec3 t\u1ef1 \u00fd thay \u0111\u1ed5i \u0111\u1ecba ch\u1ec9 c\u1ee7a n\u00f3, \u0111\u00e2y l\u00e0 vi\u1ec7c h\u1ec7 \u0111i\u1ec1u h\u00e0nh ch\u1ecbu tr\u00e1ch nhi\u1ec7m. Ngo\u00e0i ra, kh\u00f4ng ph\u1ea3i v\u00f9ng nh\u1edb n\u00e0o con tr\u1ecf C++ c\u0169ng tham chi\u1ebfu \u0111\u01b0\u1ee3c. N\u00f3 ch\u1ec9 c\u00f3 th\u1ec3 tr\u1ecf \u0111\u1ebfn lo\u1ea1i d\u1eef li\u1ec7u th\u00edch h\u1ee3p m\u00e0 th\u00f4i. B\u1ea3n ch\u1ea5t c\u1ee7a con tr\u1ecf C++ l\u00e0 qu\u1ea3n l\u00fd \u0111\u1ecba ch\u1ec9, v\u00ec th\u1ebf ta kh\u00f4ng th\u1ec3 tr\u1ecf n\u00f3 \u0111\u1ebfn bi\u1ec3u th\u1ee9c ho\u1eb7c h\u1eb1ng, nh\u1eefng \u0111\u1ed1i t\u01b0\u1ee3ng n\u00e0y v\u1ed1n kh\u00f4ng c\u00f3 \u0111\u1ecba ch\u1ec9.<\/p>\n<p>&gt;&gt;&gt; Xem th\u00eam : <a href=\"https:\/\/teky.edu.vn\/blog\/scrum-master-la-gi\/\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Scrum Master l\u00e0 g\u00ec? Ti\u00eau ch\u00ed \u0111\u1ec3 tr\u1edf th\u00e0nh Scrum Master gi\u1ecfi&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4481,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">Scrum Master l\u00e0 g\u00ec? Ti\u00eau ch\u00ed \u0111\u1ec3 tr\u1edf th\u00e0nh Scrum Master gi\u1ecfi<\/span><\/a><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Cach_su_dung_con_tro_trong_C\"><\/span>C\u00e1ch s\u1eed d\u1ee5ng con tr\u1ecf trong C++<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Khai_bao_con_tro_C\"><\/span>Khai b\u00e1o con tr\u1ecf C++<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">\u0110\u1ec3 khai b\u00e1o con tr\u1ecf C++, ta th\u1ef1c hi\u1ec7n m\u1ed9t c\u00f4ng th\u1ee9c gi\u1ed1ng nh\u01b0 c\u00e1c bi\u1ebfn b\u00ecnh th\u01b0\u1eddng:<\/p>\n<p style=\"text-align: justify;\">&lt;ki\u1ec3u d\u1eef li\u1ec7u&gt; * &lt;t\u00ean bi\u1ebfn&gt;<\/p>\n<p style=\"text-align: justify;\">Trong \u0111\u00f3, ki\u1ec3u d\u1eef li\u1ec7u c\u00f3 th\u1ec3 l\u00e0 nguy\u00ean th\u1ee7y nh\u01b0 int, char, double ho\u1eb7c c\u00e1c struct, class nh\u01b0 vector&lt;string&gt;, queue&lt;pair&lt;int, int&gt;&gt;. T\u1ea5t c\u1ea3 \u0111\u1ec1u \u0111\u01b0\u1ee3c. Nh\u01b0ng n\u1ebfu m\u1ed9t con tr\u1ecf tr\u1ecf v\u00e0o nhi\u1ec1u bi\u1ebfn kh\u00e1c nhau trong nh\u1eefng th\u1eddi \u0111i\u1ec3m kh\u00e1c nhau th\u00ec c\u00e1c bi\u1ebfn n\u00e0y ph\u1ea3i c\u00f3 c\u00f9ng m\u1ed9t ki\u1ec3u d\u1eef li\u1ec7u. Ph\u1ea3i c\u00f3 ki\u1ec3u d\u1eef li\u1ec7u chung gi\u1eefa c\u00e1c bi\u1ebfn th\u00ec m\u1edbi c\u00f3 th\u1ec3 khai b\u00e1o \u0111\u01b0\u1ee3c. D\u1ea5u * trong c\u00f4ng th\u1ee9c c\u00f3 ngh\u0129a r\u1eb1ng ta \u0111ang b\u00e1o hi\u1ec7u ho\u1ea1t \u0111\u1ed9ng khai b\u00e1o con tr\u1ecf cho tr\u00ecnh bi\u00ean d\u1ecbch.<\/p>\n<p style=\"text-align: justify;\">M\u1ed9t s\u1ed1 v\u00ed d\u1ee5 th\u01b0\u1eddng g\u1eb7p v\u1ec1 ki\u1ec3u khai b\u00e1o cho c\u00e1c lo\u1ea1i d\u1eef li\u1ec7u kh\u00e1c nhau:<\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\">N\u1ebfu bi\u1ebfn c\u00f3 ki\u1ec3u d\u1eef li\u1ec7u int th\u00ec c\u00fa ph\u00e1p khai b\u00e1o s\u1ebd l\u00e0 int *p ho\u1eb7c int* p.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">N\u1ebfu bi\u1ebfn c\u00f3 ki\u1ec3u d\u1eef li\u1ec7u string ho\u1eb7c queue&lt;char&gt; th\u00ec c\u00fa ph\u00e1p khai b\u00e1o s\u1ebd l\u00e0 string *s ho\u1eb7c queue&lt;char&gt; *q.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/lotrinhlaptrinh.teky.vn\/?utm_id=ContentBlog&amp;utm_medium=Click_Blog&amp;utm_source=ContentBlog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22417\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2023\/10\/dang-ky-lap-trinh-teky1.gif\" alt=\"dang-ky-lap-trinh-teky1\" width=\"600\" height=\"314\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">V\u1eady c\u00f3 tr\u01b0\u1eddng h\u1ee3p n\u00e0o con tr\u1ecf tr\u1ecf v\u00e0o con tr\u1ecf m\u00e0 kh\u00f4ng tr\u1ecf v\u00e0o bi\u1ebfn kh\u00f4ng? \u0110\u00e1p \u00e1n l\u00e0 c\u00f3. Con tr\u1ecf c\u0169ng l\u00e0 m\u1ed9t bi\u1ebfn, n\u00f3 \u0111\u01b0\u1ee3c hi\u1ec3u nh\u01b0 m\u1ed9t ki\u1ec3u d\u1eef li\u1ec7u. V\u00ec th\u1ebf m\u1ed9t con tr\u1ecf b\u1ea5t k\u1ef3 c\u00f3 th\u1ec3 tr\u1ecf v\u00e0o con tr\u1ecf kh\u00e1c n\u00f3. Tuy nhi\u00ean c\u00e1ch th\u1ee9c th\u1ef1c hi\u1ec7n kh\u00e1 ph\u1ee9c t\u1ea1p v\u00e0 h\u1ea7u nh\u01b0 ch\u1ec9 \u0111\u01b0\u1ee3c d\u00f9ng trong c\u00e1c cu\u1ed9c thi l\u1eadp tr\u00ecnh chuy\u00ean nghi\u1ec7p. V\u00ec th\u1ebf Teky s\u1ebd kh\u00f4ng \u0111\u1ec1 c\u1eadp s\u00e2u h\u01a1n \u1edf \u0111\u00e2y.<\/p>\n<p>&gt;&gt;&gt; Xem th\u00eam : <a href=\"https:\/\/teky.edu.vn\/blog\/vecto-trong-c\/\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Vector trong C++ l\u00e0 g\u00ec? Gi\u1ea3i \u0111\u00e1p Vector C++ v\u00e0 \u0111\u1ecbnh ngh\u0129a&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4481,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">Vector trong C++ l\u00e0 g\u00ec? Gi\u1ea3i \u0111\u00e1p Vector C++ v\u00e0 \u0111\u1ecbnh ngh\u0129a<\/span><\/a><\/p>\n<figure id=\"attachment_9355\" aria-describedby=\"caption-attachment-9355\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9355\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/huong-dan-su-dung-con-tro-c.jpg\" alt=\"H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng con tr\u1ecf C++\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/huong-dan-su-dung-con-tro-c.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/huong-dan-su-dung-con-tro-c-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9355\" class=\"wp-caption-text\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng con tr\u1ecf C++<\/figcaption><\/figure>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Gan_gia_tri_cho_con_tro\"><\/span>G\u00e1n gi\u00e1 tr\u1ecb cho con tr\u1ecf<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Sau khi khai b\u00e1o xong xu\u00f4i th\u00ec ta c\u1ea7n g\u00e1n gi\u00e1 tr\u1ecb cho con tr\u1ecf trong C++. B\u1ea1n c\u0169ng c\u1ea7n l\u01b0u \u00fd r\u1eb1ng, n\u1ebfu d\u00f9ng con tr\u1ecf m\u00e0 kh\u00f4ng kh\u1edfi t\u1ea1o th\u00ec gi\u00e1 tr\u1ecb c\u1ee7a n\u00f3 s\u1ebd kh\u00f4ng c\u00f3 \u00fd ngh\u0129a, hay c\u00f2n \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 gi\u00e1 tr\u1ecb r\u00e1c. R\u1ea5t nhi\u1ec1u r\u1ee7i ro c\u00f3 th\u1ec3 x\u1ea3y ra n\u1ebfu ch\u01b0\u01a1ng tr\u00ecnh d\u00ednh gi\u00e1 tr\u1ecb r\u00e1c, nh\u1ea5t l\u00e0 khi gi\u00e1 tr\u1ecb r\u00e1c b\u1ecb tr\u00f9ng v\u1edbi m\u1ed9t \u0111\u1ecba ch\u1ec9 bi\u1ebfn m\u00e0 b\u1ea1n \u0111ang s\u1eed d\u1ee5ng.<\/p>\n<p style=\"text-align: justify;\">\u0110\u1ec3 kh\u1edfi t\u1ea1o v\u00e0 khai b\u00e1o gi\u00e1 tr\u1ecb cho con tr\u1ecf, ta tham kh\u1ea3o v\u00ed d\u1ee5 sau:<\/p>\n<p style=\"text-align: justify;\">int *p, value;<\/p>\n<p style=\"text-align: justify;\">value = 5;<\/p>\n<p style=\"text-align: justify;\">p = &amp;value; \/\/ kh\u1edfi t\u1ea1o gi\u00e1 tr\u1ecb cho con tr\u1ecf p l\u00e0 \u0111\u1ecba ch\u1ec9 c\u1ee7a value<\/p>\n<p style=\"text-align: justify;\">Ho\u1eb7c b\u1ea1n c\u0169ng c\u00f3 th\u1ec3 khai b\u00e1o v\u00e0 kh\u1edfi t\u1ea1o \u0111\u1ed3ng th\u1eddi:<\/p>\n<p style=\"text-align: justify;\">int value = 5;<\/p>\n<p style=\"text-align: justify;\">int *p = &amp;value; \/\/ khai b\u00e1o con tr\u1ecf p v\u00e0 kh\u1edfi t\u1ea1o gi\u00e1 tr\u1ecb cho con tr\u1ecf l\u00e0 \u0111\u1ecba ch\u1ec9 c\u1ee7a value<\/p>\n<p style=\"text-align: justify;\">C\u00f2n n\u1ebfu l\u1ee1 khai b\u00e1o con tr\u1ecf r\u1ed3i nh\u01b0ng n\u00f3 v\u1eabn ch\u01b0a c\u00f3 gi\u00e1 tr\u1ecb th\u00edch h\u1ee3p, ta t\u1ea1m th\u1eddi kh\u1edfi t\u1ea1o gi\u00e1 tr\u1ecb NULL cho n\u00f3 theo c\u00f4ng th\u1ee9c: int *p_int = NULL<\/p>\n<p>&gt;&gt; Xem th\u00eam : <a href=\"https:\/\/teky.edu.vn\/blog\/cac-kieu-du-lieu-c\/\"><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;C++ l\u00e0 g\u00ec? C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u C++ g\u1ed3m 5 ki\u1ec3u g\u00ec b\u1ea1n c\u00f3 bi\u1ebft?\u00a0&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4481,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">C++ l\u00e0 g\u00ec? C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u C++ g\u1ed3m 5 ki\u1ec3u g\u00ec b\u1ea1n c\u00f3 bi\u1ebft?\u00a0<\/span><\/a><\/p>\n<p><a href=\"https:\/\/lotrinhlaptrinh.teky.vn\/?utm_id=ContentBlog&amp;utm_medium=Click_Blog&amp;utm_source=ContentBlog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22422\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2023\/10\/lap-trinh-cho-tre.gif\" alt=\"lap-trinh-cho-tre\" width=\"600\" height=\"314\" \/><\/a><\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Truy_cap_vao_bien_duoc_con_tro_tro_toi\"><\/span>Truy c\u1eadp v\u00e0o bi\u1ebfn \u0111\u01b0\u1ee3c con tr\u1ecf tr\u1ecf t\u1edbi<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Con tr\u1ecf \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 \u0111\u1eb7t t\u00ean kh\u00e1c cho m\u1ed9t bi\u1ebfn b\u1ea5t k\u1ef3 n\u00e0o \u0111\u00f3. Khi b\u1ea1n mu\u1ed1n truy c\u1eadp v\u00e0o bi\u1ebfn p \u0111\u01b0\u1ee3c con tr\u1ecf tr\u1ecf t\u1edbi, h\u00e3y quan t\u00e2m t\u1edbi *p. *p s\u1ebd c\u00f3 ki\u1ec3u xu\u1ea5t hi\u1ec7n gi\u1ed1ng v\u1edbi p. V\u00ec th\u1ebf c\u00e1ch truy c\u1eadp p ch\u00ednh l\u00e0 truy c\u1eadp *p. \u0110i\u1ec1u n\u00e0y \u0111\u01b0\u1ee3c th\u1ec3 hi\u1ec7n r\u00f5 trong v\u00ed d\u1ee5 sau:<\/p>\n<p style=\"text-align: justify;\">int *p_int = &#8230;; \/\/ something which does not matter<\/p>\n<p style=\"text-align: justify;\">string *p_string = &#8230;; \/\/ something which does not matter<\/p>\n<p style=\"text-align: justify;\">*p_int = 5; (*p_int)++; cout &lt;&lt; *p_int &lt;&lt; endl;<\/p>\n<p style=\"text-align: justify;\">if (!(*p_string).empty()) for (int i = 0; i &lt; (*p_string).size(); i++) printf(&#8220;%c&#8221;, (*p_string)[i]);<\/p>\n<figure id=\"attachment_9356\" aria-describedby=\"caption-attachment-9356\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9356\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/cau-tao-cua-con-tro-trong-c.jpg\" alt=\"C\u1ea5u t\u1ea1o c\u1ee7a con tr\u1ecf trong C++\" width=\"650\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/cau-tao-cua-con-tro-trong-c.jpg 650w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/cau-tao-cua-con-tro-trong-c-400x246.jpg 400w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-9356\" class=\"wp-caption-text\">C\u1ea5u t\u1ea1o c\u1ee7a con tr\u1ecf trong C++<\/figcaption><\/figure>\n<p>&gt;&gt;&gt; Xem th\u00eam :<a href=\"https:\/\/teky.edu.vn\/blog\/html5-la-gi\/\"> <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;HTML5 l\u00e0 g\u00ec? \u0110i\u1ec1u g\u00ec khi\u1ebfn HTML5 l\u1ea1i quan tr\u1ecdng \u0111\u1ebfn nh\u01b0 v\u1eady?&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4481,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:2,&quot;11&quot;:0,&quot;15&quot;:&quot;Arial&quot;}\">HTML5 l\u00e0 g\u00ec? \u0110i\u1ec1u g\u00ec khi\u1ebfn HTML5 l\u1ea1i quan tr\u1ecdng \u0111\u1ebfn nh\u01b0 v\u1eady?<\/span><\/a><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Ket_luan\"><\/span>K\u1ebft lu\u1eadn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">V\u1edbi nh\u1eefng ki\u1ebfn th\u1ee9c c\u0103n b\u1ea3n v\u1eeba \u0111\u01b0\u1ee3c Teky mang \u0111\u1ebfn, h\u1eb3n b\u1ea1n \u0111\u1ecdc \u0111\u00e3 c\u00f3 nh\u1eefng kh\u00e1i ni\u1ec7m tr\u1ef1c quan h\u01a1n v\u1ec1 con tr\u1ecf trong C++. \u0110\u00e2y ch\u01b0a bao gi\u1edd l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c d\u1ec5 kh\u00e1m ph\u00e1 c\u1ea3. Tuy nhi\u00ean n\u00f3 l\u1ea1i \u1ea9n ch\u1ee9a nhi\u1ec1u \u0111i\u1ec1u r\u1ea5t th\u00fa v\u1ecb. V\u00ec th\u1ebf s\u1ebd kh\u00f4ng l\u00e3ng ph\u00ed th\u1eddi gian khi b\u1ea1n quy\u1ebft \u0111\u1ecbnh t\u00ecm hi\u1ec3u s\u00e2u h\u01a1n v\u1ec1 con tr\u1ecf trong C++. \u0110\u1ec3 c\u00f3 th\u1ec3 th\u00e0nh th\u1ea3o s\u1eed d\u1ee5ng con tr\u1ecf C++, l\u1eddi khuy\u00ean c\u1ee7a Teky l\u00e0 b\u1ea1n n\u00ean th\u1ef1c h\u00e0nh nhi\u1ec1u l\u1ea7n v\u00e0 \u1ee9ng d\u1ee5ng th\u01b0\u1eddng xuy\u00ean v\u00e0o c\u00f4ng vi\u1ec7c c\u1ee7a m\u00ecnh n\u1ebfu \u0111\u01b0\u1ee3c. Ch\u00fac b\u1ea1n c\u00f3 th\u1ec3 nhanh ch\u00f3ng l\u00e0m ch\u1ee7 l\u0129nh v\u1ef1c n\u00e0y!<\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"Tim_Hieu_Teky_Hoc_Vien_Cong_Nghe_Tre_Hang_Dau_Viet_Nam\"><\/span><span style=\"font-size: 20px; color: #339966;\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;C\u00f9ng T\u00ecm Hi\u1ec3u V\u1ec1 Teky H\u1ecdc Vi\u1ec7n 5 sao \u0110\u00e0o T\u1ea1o Tr\u1ebb Em H\u1ecdc L\u1eadp Tr\u00ecnh (4-18 tu\u1ed5i)&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:17153,&quot;3&quot;:{&quot;1&quot;:0},&quot;11&quot;:4,&quot;12&quot;:0,&quot;17&quot;:1}\">T\u00ecm Hi\u1ec3u Teky H\u1ecdc Vi\u1ec7n C\u00f4ng Ngh\u1ec7 Tr\u1ebb H\u00e0ng \u0110\u1ea7u Vi\u1ec7t Nam<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><iframe loading=\"lazy\" title=\"H\u1ecdc l\u1eadp tr\u00ecnh tr\u1ebb em \u1edf \u0111\u00e2u? - Gi\u1edbi thi\u1ec7u h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 TEKY h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/kGgr0XJAxFM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><strong>TEKY l\u00e0 H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7<\/strong> v\u1edbi ch\u01b0\u01a1ng tr\u00ecnh gi\u1ea3ng d\u1ea1y STEAM (Science \u2013 Technology \u2013 Engineering \u2013 Art \u2013 Mathematics) theo chu\u1ea9n M\u1ef9 \u0111\u1ea7u ti\u00ean t\u1ea1i Vi\u1ec7t Nam d\u00e0nh cho tr\u1ebb em t\u1eeb 4 \u0111\u1ebfn 18 tu\u1ed5i.<\/p>\n<p>\u0110\u01b0\u1ee3c th\u00e0nh l\u1eadp v\u00e0o th\u00e1ng 6 n\u0103m 2016, TEKY quy\u1ebft t\u00e2m th\u1ef1c hi\u1ec7n s\u1ee9 m\u1ec7nh mang \u0111\u1ebfn cho th\u1ebf h\u1ec7 tr\u1ebb Vi\u1ec7t Nam ki\u1ebfn th\u1ee9c to\u00e0n di\u1ec7n v\u1ec1 STEAM, \u0111\u1eb7c bi\u1ec7t l\u00e0 c\u00e1c t\u01b0 duy c\u00f4ng ngh\u1ec7, khoa h\u1ecdc m\u00e1y t\u00ednh v\u00e0 k\u1ef9 n\u0103ng th\u1ebf k\u1ef7 21 \u2013 4Cs (Critical Thinking: T\u01b0 duy ph\u1ea3n bi\u1ec7n \u2013 Communication: Giao ti\u1ebfp \u2013 Creativity: S\u00e1ng t\u1ea1o \u2013 Collaboration: L\u00e0m vi\u1ec7c nh\u00f3m).<\/p>\n<figure id=\"attachment_14828\" aria-describedby=\"caption-attachment-14828\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/teky.edu.vn\/?utm_source=Blog&amp;utm_medium=baiviet\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14828 size-full\" src=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi.jpg\" alt=\"Tr\u1ea3i nghi\u1ec7m h\u1ecdc l\u1eadp tr\u00ecnh mi\u1ec5n ph\u00ed\" width=\"600\" height=\"400\" srcset=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi.jpg 600w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi-400x267.jpg 400w, https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/03\/Trai-nghiem-hoc-lap-trinh-mien-phi-272x182.jpg 272w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-14828\" class=\"wp-caption-text\">Tr\u1ea3i nghi\u1ec7m h\u1ecdc l\u1eadp tr\u00ecnh mi\u1ec5n ph\u00ed<\/figcaption><\/figure>\n<h4><span class=\"ez-toc-section\" id=\"Day_la_chuong_trinh_khong_chi_trang_bi_kien_thuc_lap_trinh_ma_con_ren_luyen_nhom_ky_nang_4Cs_Tre_se_duoc\"><\/span>\u0110\u00e2y l\u00e0 ch\u01b0\u01a1ng tr\u00ecnh kh\u00f4ng ch\u1ec9 trang b\u1ecb ki\u1ebfn th\u1ee9c l\u1eadp tr\u00ecnh m\u00e0 c\u00f2n r\u00e8n luy\u1ec7n nh\u00f3m k\u1ef9 n\u0103ng 4Cs. Tr\u1ebb s\u1ebd \u0111\u01b0\u1ee3c:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\u00a0H\u1ecdc t\u01b0 duy ph\u1ea3n bi\u1ec7n th\u00f4ng qua vi\u1ec7c ph\u00e2n t\u00edch c\u00e1c v\u1ea5n \u0111\u1ec1.<\/li>\n<li>\u00a0H\u1ecdc t\u00ednh s\u00e1ng t\u1ea1o t\u01b0 duy Logic th\u00f4ng qua vi\u1ec7c l\u1eafp \u0111\u1eb7t v\u00e0 l\u1eadp tr\u00ecnh robot th \u00f4ng qua c\u00e1c m\u00f4 h\u00ecnh Lego Mindstorm, app tr\u00f2 ch\u01a1i. Gi\u00fap con h\u1ecdc gi\u1ecfi m\u00f4n To\u00e1n tr\u00ean l\u1edbp<\/li>\n<li>\u00a0K\u1ef9 n\u0103ng h\u1ee3p t\u00e1c th\u00f4ng qua c\u00e1c tr\u00f2 ch\u01a1i team-building, c\u00e1c d\u1ef1 \u00e1n nh\u00f3m tr\u00ean l\u1edbp.<\/li>\n<li>\u00a0Ph\u00e1t huy kh\u1ea3 n\u0103ng giao ti\u1ebfp hi\u1ec7u qu\u1ea3 b\u1eb1ng nhi\u1ec1u b\u00e0i t\u1eadp v\u00e0 ho\u1ea1t \u0111\u1ed9ng h\u1ea5p d\u1eabn.<\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" title=\"Shark Nguy\u1ec5n Ho\u00e0 B\u00ecnh \u0111\u1ed3ng h\u00e0nh c\u00f9ng con h\u1ecdc l\u1eadp tr\u00ecnh t\u1ea1i h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 Teky h\u00e0ng \u0111\u1ea7u Vi\u1ec7t Nam\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/q6QbqIs6ll8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>C\u00e1c b\u1ed9 m\u00f4n gi\u1ea3ng d\u1ea1y t\u1ea1i Teky g\u1ed3m: <span style=\"font-weight: 400;\">L\u1eadp tr\u00ecnh v\u00e0 ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">l\u1eadp tr\u00ecnh game<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">l\u1eadp tr\u00ecnh web v\u1edbi python<\/span> <span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">L\u1eadp tr\u00ecnh Scratch<\/span> <span style=\"font-weight: 400;\">Robotics<\/span> Engineering, C\u00f4ng ngh\u1ec7 3D v\u00e0 MultiMedia. Ch\u00fang t\u00f4i tin r\u1eb1ng tr\u1ebb em Vi\u1ec7t Nam c\u00f3 c\u01a1 h\u1ed9i ph\u00e1t tri\u1ec3n m\u1ea1nh m\u1ebd trong m\u1ed9t n\u1ec1n kinh t\u1ebf s\u1ed1 v\u00e0 c\u1ea7n \u0111\u01b0\u1ee3c trang b\u1ecb s\u1eb5n s\u00e0ng \u0111\u1ec3 tr\u1edf th\u00e0nh nh\u1eefng doanh nh\u00e2n c\u00f4ng ngh\u1ec7 trong t\u01b0\u01a1ng lai.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Lien_he_ngay_hoc_vien_cong_nghe_sang_tao_TEKY_de_duoc_tu_van_khoa_hoc\"><\/span><span style=\"color: #008000;\"><b>Li\u00ean h\u1ec7 ngay h\u1ecdc vi\u1ec7n c\u00f4ng ngh\u1ec7 s\u00e1ng t\u1ea1o TEKY \u0111\u1ec3 \u0111\u01b0\u1ee3c t\u01b0 v\u1ea5n kh\u00f3a h\u1ecdc:<\/b><\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Cam k\u00eat 7 tu\u1ed5i c\u00f3 th\u1ec3 l\u1eadp tr\u00ecnh<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Top 10 d\u1ef1 \u00e1n gi\u00e1o d\u1ee5c c\u00f3 t\u1ea7m \u1ea3nh h\u01b0\u1edfng nh\u1ea5t \u0110\u00f4ng Nam \u00c1 2017 &amp; 2018<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Top 3 D\u1ef1 \u00e1n xu\u1ea5t s\u1eafc nh\u1ea5t, NextGen \u2013 Th\u1ee5y S\u0129<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Hotline H\u00e0 N\u1ed9i: 024-7109-6668 | 0975-241-015<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Hotline H\u1ed3 Ch\u00ed Minh: 028-7109 9948 | 097-900-8642<\/span><\/li>\n<\/ul>\n<p>Website\u00a0<a href=\"https:\/\/teky.edu.vn\/\">https:\/\/teky.edu.vn<\/a>\u00a0| Email: support@teky.edu.vn |<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Con tr\u1ecf hay c\u00f2n \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 Pointer trong C++ l\u00e0 m\u1ed9t ph\u1ea7n ki\u1ebfn th\u1ee9c kh\u00e1 kh\u00f3. Tuy nhi\u00ean c\u0169ng kh\u00f4ng k\u00e9m ph\u1ea7n th\u00fa v\u1ecb. N\u1ebfu b\u1ea1n n\u1eafm ch\u1eafc c\u00e1ch s\u1eed d\u1ee5ng con tr\u1ecf trong C++ th\u00ec s\u1ebd d\u1ec5 d\u00e0ng th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c cao c\u1ea5p c\u00f9ng b\u1ed9 nh\u1edb. Vi\u1ec7c n\u00e0y l\u00e0 v\u00f4 c\u00f9ng &hellip;<\/p>\n","protected":false},"author":10,"featured_media":9358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-9354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lap-trinh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.9 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf<\/title>\n<meta name=\"description\" content=\"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf\" \/>\n<meta property=\"og:description\" content=\"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\" \/>\n<meta property=\"og:site_name\" content=\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TekyAcademy\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T13:59:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-28T02:13:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"650\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kh\u00e1nh Kim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SteamTeky\" \/>\n<meta name=\"twitter:site\" content=\"@SteamTeky\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kh\u00e1nh Kim\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\"},\"author\":{\"name\":\"Kh\u00e1nh Kim\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6\"},\"headline\":\"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf\",\"datePublished\":\"2023-10-20T13:59:57+00:00\",\"dateModified\":\"2023-10-28T02:13:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\"},\"wordCount\":2914,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg\",\"articleSection\":[\"IT - L\u1eadp tr\u00ecnh\"],\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\",\"url\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\",\"name\":\"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf\",\"isPartOf\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg\",\"datePublished\":\"2023-10-20T13:59:57+00:00\",\"dateModified\":\"2023-10-28T02:13:41+00:00\",\"description\":\"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.\",\"breadcrumb\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage\",\"url\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg\",\"contentUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg\",\"width\":650,\"height\":400,\"caption\":\"Con tr\u1ecf trong C++\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IT - L\u1eadp tr\u00ecnh\",\"item\":\"https:\/\/teky.edu.vn\/blog\/lap-trinh\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#website\",\"url\":\"https:\/\/teky.edu.vn\/blog\/\",\"name\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\",\"description\":\"Tr\u1ebb em c\u1ea7n h\u1ecdc l\u1eadp tr\u00ecnh\",\"publisher\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/teky.edu.vn\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#organization\",\"name\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\",\"url\":\"https:\/\/teky.edu.vn\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png\",\"contentUrl\":\"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png\",\"width\":495,\"height\":234,\"caption\":\"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7\"},\"image\":{\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/TekyAcademy\",\"https:\/\/x.com\/SteamTeky\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6\",\"name\":\"Kh\u00e1nh Kim\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g\",\"caption\":\"Kh\u00e1nh Kim\"},\"url\":\"https:\/\/teky.edu.vn\/blog\/author\/kimkhanh\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf","description":"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/","og_locale":"vi_VN","og_type":"article","og_title":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf","og_description":"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.","og_url":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/","og_site_name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","article_publisher":"https:\/\/www.facebook.com\/TekyAcademy","article_published_time":"2023-10-20T13:59:57+00:00","article_modified_time":"2023-10-28T02:13:41+00:00","og_image":[{"width":650,"height":400,"url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg","type":"image\/jpeg"}],"author":"Kh\u00e1nh Kim","twitter_card":"summary_large_image","twitter_creator":"@SteamTeky","twitter_site":"@SteamTeky","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Kh\u00e1nh Kim","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"12 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#article","isPartOf":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/"},"author":{"name":"Kh\u00e1nh Kim","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6"},"headline":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf","datePublished":"2023-10-20T13:59:57+00:00","dateModified":"2023-10-28T02:13:41+00:00","mainEntityOfPage":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/"},"wordCount":2914,"commentCount":0,"publisher":{"@id":"https:\/\/teky.edu.vn\/blog\/#organization"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage"},"thumbnailUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg","articleSection":["IT - L\u1eadp tr\u00ecnh"],"inLanguage":"vi","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/","url":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/","name":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf","isPartOf":{"@id":"https:\/\/teky.edu.vn\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage"},"thumbnailUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg","datePublished":"2023-10-20T13:59:57+00:00","dateModified":"2023-10-28T02:13:41+00:00","description":"B\u1ea1n \u0111\u00e3 bi\u1ebft t\u00e1c d\u1ee5ng c\u1ee7a con tr\u1ecf trong C++ trong l\u1eadp tr\u00ecnh hay ch\u01b0a? \u0110\u00e2y l\u00e0 m\u1ed9t l\u0129nh v\u1ef1c r\u1ea5t kh\u00f3 nh\u1eefng c\u0169ng r\u1ea5t quan tr\u1ecdng.","breadcrumb":{"@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#primaryimage","url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg","contentUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/10\/con-tro-trong-c.jpg","width":650,"height":400,"caption":"Con tr\u1ecf trong C++"},{"@type":"BreadcrumbList","@id":"https:\/\/teky.edu.vn\/blog\/con-tro-trong-c-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IT - L\u1eadp tr\u00ecnh","item":"https:\/\/teky.edu.vn\/blog\/lap-trinh\/"},{"@type":"ListItem","position":2,"name":"Con tr\u1ecf trong C++ l\u00e0 g\u00ec? C\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n xung quanh con tr\u1ecf"}]},{"@type":"WebSite","@id":"https:\/\/teky.edu.vn\/blog\/#website","url":"https:\/\/teky.edu.vn\/blog\/","name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","description":"Tr\u1ebb em c\u1ea7n h\u1ecdc l\u1eadp tr\u00ecnh","publisher":{"@id":"https:\/\/teky.edu.vn\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/teky.edu.vn\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/teky.edu.vn\/blog\/#organization","name":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7","url":"https:\/\/teky.edu.vn\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png","contentUrl":"https:\/\/teky.edu.vn\/blog\/wp-content\/uploads\/2021\/02\/logo-teky.png","width":495,"height":234,"caption":"TEKY - H\u1ecdc vi\u1ec7n s\u00e1ng t\u1ea1o c\u00f4ng ngh\u1ec7"},"image":{"@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TekyAcademy","https:\/\/x.com\/SteamTeky"]},{"@type":"Person","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/8f946d2123e4e2277107e392790a1bd6","name":"Kh\u00e1nh Kim","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/teky.edu.vn\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab08c4bbf1d0787f26b32ab04d2cb7e329a3a082ea3dcb6ba78fb27076b856a9?s=96&d=mm&r=g","caption":"Kh\u00e1nh Kim"},"url":"https:\/\/teky.edu.vn\/blog\/author\/kimkhanh\/"}]}},"_links":{"self":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/comments?post=9354"}],"version-history":[{"count":3,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9354\/revisions"}],"predecessor-version":[{"id":22977,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/posts\/9354\/revisions\/22977"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/media\/9358"}],"wp:attachment":[{"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/media?parent=9354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/categories?post=9354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teky.edu.vn\/blog\/wp-json\/wp\/v2\/tags?post=9354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}