عرض مشاركة واحدة
  #5  
قديم 13-11-2010, 02:04 PM
ahmed abobakr ahmed abobakr غير متواجد حالياً
عضو نشيط
 
تاريخ التسجيل: Mar 2008
المشاركات: 205
معدل تقييم المستوى: 18
ahmed abobakr is on a distinguished road
افتراضي

اقتباس:
المشاركة الأصلية كتبت بواسطة badnamef4 مشاهدة المشاركة
بسم الله الرحمن الرحيم
السلام عليكم و رحمة الله و بركاته
أنا عندي سؤال احتمال كبير يبقى أهبل
ليه بنكتب using namespace std; مش using std; زي في أي namespace عادية
السلام عليكم و رحمة الله و بركاته
السلام عليكم
كل عام وانتم بخير
اسف للغياب الطويل لظروف الدراسة
بالنسبة لسؤالك يابشمهندس هوا مش سؤال اهبل ولا حاجة

ودا الرد على سؤالك

using namespace std
library in c and c++ that contains set of classes , objects and functions
the commonly used functions from this library is cout , cin , endl
if you write ur program without using namespace std the compiler will give u error function(cout,cin,endl.....) undeclared

to declare this functions without writing using namespace std
use this syntax
std::cout
std::cin
std::endl

see examples

1- with using namespace std

كود:
#include<iostream>
using  namespace std;
int main()
{
    cout<<"hello world"<<endl;  
    system("pause");
    return 0;
}
2 - without using namespace std

كود:
#include<iostream>
int main()
{
    std::cout<<"hello world"<<std::endl;
    system("pause");
    return 0;
}





اتمنى انى اكون وفقت فى توصيل المعلومة ولى فى اى استفسار انا موجود
















__________________
اللهم انى استغفرك واتوب اليك
فأغفرلى
انه لا يغفر الذنوب الا انت