#vector #Emplace_back
🔵وکتور(vector)
🔹تابع Emplace_back
یک داده را به آخر وکتور اضافه می کند.
🔹پارامتر ها :
🔻مفهوم Args :
داده ای باید به آخر وکتور اضافه شود
Output:
myvector contains: 10 20 30 100 200
🔰ترجمه شده درسایت
www.cplusplus.com
@Learncpp
🔵وکتور(vector)
🔹تابع Emplace_back
template <class... Args>
void emplace_back (Args&&... args);
یک داده را به آخر وکتور اضافه می کند.
🔹پارامتر ها :
🔻مفهوم Args :
داده ای باید به آخر وکتور اضافه شود
#include <iostream>
#include <vector>
using namespace std;
int main ( )
{
vector<int> myvector={10,20,30};
myvector.emplace_back(100);
myvector.emplace_back(200);
cout<<"myvector contains:";
for(auto& x: myvector)
cout<<' '<<x;
cout<<'\n';
return 0;
}
Output:
myvector contains: 10 20 30 100 200
🔰ترجمه شده درسایت
www.cplusplus.com
@Learncpp
#vector
📚فهرست آموزش کتابخانه vector(وکتورها)
♦️وکتورچیست
#vector
t.me/Learncpp/550
♦️توضیحات بیشتر درباره وکتور
t.me/Learncpp/551
#pop_back
t.me/Learncpp/552
#push_back
t.me/Learncpp/553
#insert
1. t.me/Learncpp/556
2. t.me/Learncpp/557
#erase
t.me/Learncpp/558
#capacity
t.me/Learncpp/559
#clear
t.me/Learncpp/560
#size
t.me/Learncpp/563
#reserve
t.me/Learncpp/563
#resize
t.me/Learncpp/567
#max_size
t.me/Learncpp/572
#at
t.me/Learncpp/573
#operator
t.me/Learncpp/576
#Empty
t.me/Learncpp/582
#iterator
t.me/Learncpp/584
#Begin
t.me/Learncpp/588
#cbegin
t.me/Learncpp/589
#Rbegin
t.me/Learncpp/590
#crbegin
t.me/Learncpp/591
#End
t.me/Learncpp/595
#cend
t.me/Learncpp/596
#Rend
t.me/Learncpp/597
#crend
t.me/Learncpp/612
#Back
t.me/Learncpp/601
#Emplace
t.me/Learncpp/606
#Emplace_back
t.me/Learncpp/607
#operator
t.me/Learncpp/611
#Front
t.me/Learncpp/613
#swap
1. t.me/Learncpp/616
2. t.me/Learncpp/617
#data
t.me/Learncpp/621
#shrink_to_fit
t.me/Learncpp/625
#vector::vector
1. t.me/Learncpp/632
2. t.me/Learncpp/633
3. t.me/Learncpp/634
#assing
t.me/Learncpp/641
#relation_operator
t.me/Learncpp/652
📝ترجمه کتابخانه از سایت رسمی برنامه نویسان ++C
www.cplusplus.com
🔸کمک به بچه های سرطانی
💝@tabligh_cpp
🔹آموزش تخصصی ++C
🛡@Learncpp
📚فهرست آموزش کتابخانه vector(وکتورها)
♦️وکتورچیست
#vector
t.me/Learncpp/550
♦️توضیحات بیشتر درباره وکتور
t.me/Learncpp/551
#pop_back
t.me/Learncpp/552
#push_back
t.me/Learncpp/553
#insert
1. t.me/Learncpp/556
2. t.me/Learncpp/557
#erase
t.me/Learncpp/558
#capacity
t.me/Learncpp/559
#clear
t.me/Learncpp/560
#size
t.me/Learncpp/563
#reserve
t.me/Learncpp/563
#resize
t.me/Learncpp/567
#max_size
t.me/Learncpp/572
#at
t.me/Learncpp/573
#operator
t.me/Learncpp/576
#Empty
t.me/Learncpp/582
#iterator
t.me/Learncpp/584
#Begin
t.me/Learncpp/588
#cbegin
t.me/Learncpp/589
#Rbegin
t.me/Learncpp/590
#crbegin
t.me/Learncpp/591
#End
t.me/Learncpp/595
#cend
t.me/Learncpp/596
#Rend
t.me/Learncpp/597
#crend
t.me/Learncpp/612
#Back
t.me/Learncpp/601
#Emplace
t.me/Learncpp/606
#Emplace_back
t.me/Learncpp/607
#operator
t.me/Learncpp/611
#Front
t.me/Learncpp/613
#swap
1. t.me/Learncpp/616
2. t.me/Learncpp/617
#data
t.me/Learncpp/621
#shrink_to_fit
t.me/Learncpp/625
#vector::vector
1. t.me/Learncpp/632
2. t.me/Learncpp/633
3. t.me/Learncpp/634
#assing
t.me/Learncpp/641
#relation_operator
t.me/Learncpp/652
📝ترجمه کتابخانه از سایت رسمی برنامه نویسان ++C
www.cplusplus.com
🔸کمک به بچه های سرطانی
💝@tabligh_cpp
🔹آموزش تخصصی ++C
🛡@Learncpp
Telegram
Learning ©➕➕
#vector
🔵 وکتور(vector) چیست
خوب اول ما باید بدونیم وکتور یا همون بردار چیه تا بتونیم تشخیص بدیم که کجا باید ازش استفاده کنیم شما تا حالا حتما از آرایه ها استفاده کردید و حتما بزرگ ترین مشکل آرایه ها رو هم میدونید و اون مشکل همون ثابت بودن طول آرایه است،…
🔵 وکتور(vector) چیست
خوب اول ما باید بدونیم وکتور یا همون بردار چیه تا بتونیم تشخیص بدیم که کجا باید ازش استفاده کنیم شما تا حالا حتما از آرایه ها استفاده کردید و حتما بزرگ ترین مشکل آرایه ها رو هم میدونید و اون مشکل همون ثابت بودن طول آرایه است،…