1⃣0⃣ Dynamic Memory Allocation for Objects
#include <iostream>
using namespace std;
class Box
{
public:
Box() {
cout « "Constructor called!" «endl;
}
~Box() {
cout « "Destructor called!" «endl;
}
};
int main( )
{
Box* myBoxArray = new Box[4];
delete [] myBoxArray; // Delete array
return 0;
}
—------------------------—
compile and run:
Constructor called!
Constructor called!
Constructor called!
Constructor called!
Destructor called!
Destructor called!
Destructor called!
Destructor called!
0⃣1⃣ @computeriha
#include <iostream>
using namespace std;
class Box
{
public:
Box() {
cout « "Constructor called!" «endl;
}
~Box() {
cout « "Destructor called!" «endl;
}
};
int main( )
{
Box* myBoxArray = new Box[4];
delete [] myBoxArray; // Delete array
return 0;
}
—------------------------—
compile and run:
Constructor called!
Constructor called!
Constructor called!
Constructor called!
Destructor called!
Destructor called!
Destructor called!
Destructor called!
0⃣1⃣ @computeriha
0⃣1⃣ برنامه نويسي سطح پايين (Low-level) روح برنامه نويسها را جلا ميبخشد
(John Carmack)
1⃣0⃣ @computeriha
(John Carmack)
1⃣0⃣ @computeriha
1⃣0⃣ آموزش قدم به قدم برنامه نویسی وب با PHP (جلسه نوزدهم: #php19)
🌎 دانلود مستقیم
0⃣1⃣ @computeriha
👇👇👇
🌎 دانلود مستقیم
0⃣1⃣ @computeriha
👇👇👇
#آیتیخبر
✳️آیفون ۱۵۰ هزار تومان گران شد
نخستین واکنش بازار موبایل به طرح رجیستری گران شدن ۱۵۰ هزار تومانی آیفون بود.
📌 در حال حاضر بازار فروش گوشیهای آیفون راکد شده و فروشندگان نمیدانند بفروشند یا نفروشند. / خبرآنلاین
🆔 https://telegram.me/joinchat/BMWizTugT5Qvr54A8-PPXA
✳️آیفون ۱۵۰ هزار تومان گران شد
نخستین واکنش بازار موبایل به طرح رجیستری گران شدن ۱۵۰ هزار تومانی آیفون بود.
📌 در حال حاضر بازار فروش گوشیهای آیفون راکد شده و فروشندگان نمیدانند بفروشند یا نفروشند. / خبرآنلاین
🆔 https://telegram.me/joinchat/BMWizTugT5Qvr54A8-PPXA
0⃣1⃣ Defining a Namespace c++
—---------------------
#include <iostream>
using namespace std;
// first name space
namespace first_space{
void func(){
cout « "Inside first_space" « endl;
}
}
// second name space
namespace second_space{
void func(){
cout « "Inside second_space" « endl;
}
}
int main ()
{
// Calls function from first name space.
first_space::func();
// Calls function from second name space.
second_space::func();
return 0;
}
—---------------------------------—
1⃣0⃣ @computeriha
—---------------------
#include <iostream>
using namespace std;
// first name space
namespace first_space{
void func(){
cout « "Inside first_space" « endl;
}
}
// second name space
namespace second_space{
void func(){
cout « "Inside second_space" « endl;
}
}
int main ()
{
// Calls function from first name space.
first_space::func();
// Calls function from second name space.
second_space::func();
return 0;
}
—---------------------------------—
1⃣0⃣ @computeriha
1⃣0⃣ آموزش قدم به قدم برنامه نویسی وب با PHP (جلسه نوزدهم: #php20)
🌎 دانلود مستقیم
0⃣1⃣ @computeriha
👇👇👇
🌎 دانلود مستقیم
0⃣1⃣ @computeriha
👇👇👇