الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

عن string

مغلق
بدأه c_languge في 22 مارس 2003 · 4 رد · 1,016 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

عندما استخدم

#include 

string name;

تظهر رسالة خطأ على جملة

string name;

وذلك في فيجوال سي ++

اختكم

لغة سي

#2

يا أختي لغة السي من المعرفو أن التعريف يجب أن يكتب بطريقه التاليه

#include < string >

using namespace std ; 

string name ;

جربي كده يمكن يطلع صح :) !

وشكراً(f)

If you think yourself that you are nobody, you should go somewhere to find yourself

#3

اختي لغه سي

هناك فرق بين

string و string.h

#include      /* مكتبه للغه C++ */
#include   /* مكتبه للغه C */

/* as we know, C++ is advanced C
    so, you can use
#include 
in C++.

also you can use in C, but you should know what that library contain
#include 
*/

وامر ال string الذي استخدمتيه هو امر للفه C++

وهو في مكتبه string وليس string.h

/* للغه C++ */
#include 
using namespace std;
string name;

/* للغه C */
#include 
char *name;

واتمنى انه يكون شرحي واضح

وشكرا

#4

السلام عليكم

شكرا لكم على ردكم

هذا ما كنت اطلبه

اختكم

لغة سي

#5

about string u cant declare a variable called string name but u can use the header fileand then write char name_of_the_string[];

because the string is an array of charcters and the the previous header file is used for using some string fucntions such as strlen,strcmp...etc hope my answer clear to you

thanx

هذا الموضوع مغلق.

مواضيع مشابهة