تبلیغات :
خرید لپ تاپ استوک
ماهان سرور
آکوستیک ، فوم شانه تخم مرغی ، پنل صداگیر ، یونولیت
دستگاه جوجه کشی حرفه ای
فروش آنلاین لباس کودک
خرید فالوور ایرانی
خرید فالوور اینستاگرام
خرید ممبر تلگرام

[ + افزودن آگهی متنی جدید ]




صفحه 93 از 326 اولاول ... 4383899091929394959697103143193 ... آخرآخر
نمايش نتايج 921 به 930 از 3257

نام تاپيک: سوالات مبتدی و عمومی (++C, C) خود را اینجا بپرسید

  1. #921
    داره خودمونی میشه
    تاريخ عضويت
    Sep 2009
    پست ها
    48

    پيش فرض تفاوت و طرز استفاده __stdcall ، __cdecl، __fastcall، __thiscall

    سوال دوم :

    من تفاوت و طرز استفاده __stdcall ، __cdecl، __fastcall، __thiscallرا بلد نیستم، در MSDN نگاه کردم ظاهرا کامل توضیح داده بود من کلمه کلمه ترجمه کردم ولی آخرش نفهمیدم چی شد، یعنی متوجه نشدم دقیقا وقتی از این ها استفاده می کنی چه اتفاقی می افته ؟ یا یکسری جاها گفته بود اگر در چنین وضعیتی باشید ف استفاده از این بهتره زیرا . . ..

    من نه شرطش را متوجه شدم و نه دلیلش را.

    من توضیحات انگلیسی MSDN را در اینجا ( با لینک کاملش ) قرار می دم ، هرکس که فهمید چی گفته لطفا توضیح بده ( بی زحمت توضیح کامل ) اگر لطف کنید ترجمه دقیق فارسی آن را بگذارید ، من کم کم یاد می گیرم متن انگلیسی بخوانم.

    با تشکر از لطف دوستان-ببخشید اینقدر سوال می پرسما
    __thiscall :


    The __thiscall calling convention is used on member functions and is the default calling convention used by C++ member functions that do not use variable arguments. Under __thiscall, the callee cleans the stack, which is impossible for vararg functions. Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX, and not on the stack, on the x86 architecture.

    One reason to use __thiscall is in classes whose member functions use __clrcall by default. In that case, you can use __thiscall to make individual member functions callable from native code.

    When compiling with [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , all functions and function pointers are __clrcall unless specified otherwise.

    In releases before Visual C++ 2005, the thiscall calling convention could not be explicitly specified in a program, because thiscall was not a keyword.

    vararg member functions use the __cdecl calling convention. All function arguments are pushed on the stack, with the this pointer placed on the stack last

    Because this calling convention applies only to C++, there is no C name decoration scheme.

    On Itanium Processor Family (IPF) and x64 machines, __thiscall is accepted and ignored by the compiler; on an IPF chip, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __fastcall :

    The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible. The following list shows the implementation of this calling convention.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __cdecl :

    This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention.

    On Itanium Processor Family (IPF) and x64 processors, __cdecl is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    Place the __cdecl modifier before a variable or a function name. Because the C naming and calling conventions are the default, the only time you need to use __cdecl is when you have specified the /Gz (stdcall) or /Gr (fastcall) compiler option. The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option forces the __cdecl calling convention.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition. Given this class definition,

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __stdcall:

    The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl. Functions that use this calling convention require a function prototype.

    The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option specifies __stdcall for all functions not explicitly declared with a different calling convention.

    Functions declared using the __stdcall modifier return values the same way as functions declared using [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] .

    On Itanium Processor Family (IPF) and x64 processors, __stdcall is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]



    ---------- Post added at 06:00 AM ---------- Previous post was at 05:58 AM ----------

    می دونی ترجه کلمه کلمه با بابیلون انجام می دم ، مشکلم 2 تاست :
    1. بعضی از کلمات معنای لغوی نمی دهند ، و اصطلاح هستند
    2.جمله بندی به طوری که معنی بده
    برای همینه که از شما خواستم معنای دقیق را هم بنویسید تا بتوانم هی با متن انگلیسیش مقایسه کنم تا دستم بیاد.

    ممنون


    ---------- Post added at 06:02 AM ---------- Previous post was at 06:00 AM ----------

    می دونی ترجه کلمه کلمه با بابیلون انجام می دم ، مشکلم 2 تاست :
    1. بعضی از کلمات معنای لغوی نمی دهند ، و اصطلاح هستند
    2.جمله بندی به طوری که معنی بده
    برای همینه که از شما خواستم معنای دقیق را هم بنویسید تا بتوانم هی با متن انگلیسیش مقایسه کنم تا دستم بیاد.

    ممنون


    ---------- Post added at 06:04 AM ---------- Previous post was at 06:02 AM ----------

    سوال دوم :

    من تفاوت و طرز استفاده __stdcall ، __cdecl، __fastcall، __thiscallرا بلد نیستم، در MSDN نگاه کردم ظاهرا کامل توضیح داده بود من کلمه کلمه ترجمه کردم ولی آخرش نفهمیدم چی شد، یعنی متوجه نشدم دقیقا وقتی از این ها استفاده می کنی چه اتفاقی می افته ؟ یا یکسری جاها گفته بود اگر در چنین وضعیتی باشید ف استفاده از این بهتره زیرا . . ..

    من نه شرطش را متوجه شدم و نه دلیلش را.

    من توضیحات انگلیسی MSDN را در اینجا ( با لینک کاملش ) قرار می دم ، هرکس که فهمید چی گفته لطفا توضیح بده ( بی زحمت توضیح کامل ) اگر لطف کنید ترجمه دقیق فارسی آن را بگذارید ، من کم کم یاد می گیرم متن انگلیسی بخوانم.

    با تشکر از لطف دوستان-ببخشید اینقدر سوال می پرسما
    __thiscall :


    The __thiscall calling convention is used on member functions and is the default calling convention used by C++ member functions that do not use variable arguments. Under __thiscall, the callee cleans the stack, which is impossible for vararg functions. Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX, and not on the stack, on the x86 architecture.

    One reason to use __thiscall is in classes whose member functions use __clrcall by default. In that case, you can use __thiscall to make individual member functions callable from native code.

    When compiling with [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , all functions and function pointers are __clrcall unless specified otherwise.

    In releases before Visual C++ 2005, the thiscall calling convention could not be explicitly specified in a program, because thiscall was not a keyword.

    vararg member functions use the __cdecl calling convention. All function arguments are pushed on the stack, with the this pointer placed on the stack last

    Because this calling convention applies only to C++, there is no C name decoration scheme.

    On Itanium Processor Family (IPF) and x64 machines, __thiscall is accepted and ignored by the compiler; on an IPF chip, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __fastcall :

    The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible. The following list shows the implementation of this calling convention.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __cdecl :

    This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention.

    On Itanium Processor Family (IPF) and x64 processors, __cdecl is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    Place the __cdecl modifier before a variable or a function name. Because the C naming and calling conventions are the default, the only time you need to use __cdecl is when you have specified the /Gz (stdcall) or /Gr (fastcall) compiler option. The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option forces the __cdecl calling convention.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition. Given this class definition,

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __stdcall:

    The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl. Functions that use this calling convention require a function prototype.

    The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option specifies __stdcall for all functions not explicitly declared with a different calling convention.

    Functions declared using the __stdcall modifier return values the same way as functions declared using [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] .

    On Itanium Processor Family (IPF) and x64 processors, __stdcall is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]


  2. #922
    پروفشنال moh72's Avatar
    تاريخ عضويت
    Oct 2010
    محل سكونت
    اردبیل
    پست ها
    742

    پيش فرض

    سلام من میخوام برنامه نویسی یاد بگیرم و هیچگونه اطلاعاتی تو این زمینه ندارم الان میخواستم ببینم تفاوت c ها در چیه؟ C++,C#,visual C,C...
    واینکه میگن C سخته میتونم خودم یاد بگیرم؟

  3. #923
    داره خودمونی میشه Mr Mohabat's Avatar
    تاريخ عضويت
    Mar 2011
    پست ها
    131

    پيش فرض

    به نظر من تو ویژال استدیو کار کن
    چون اگه با ٰتوبورو C یا جاهای دیگه کار کنی بخاطر محیطش کلا از برنامه نویسی زده میشی
    البته این نظر من بود
    برای شروع هم بو سراغ دستور های
    for
    while
    if
    و تعریف متغیر
    کمکی هم خواستی تا اونجا که بتونم در خدمتم
    موفق باشی

  4. این کاربر از Mr Mohabat بخاطر این مطلب مفید تشکر کرده است


  5. #924
    داره خودمونی میشه
    تاريخ عضويت
    Sep 2009
    پست ها
    48

    14

    سوال دوم :

    من تفاوت و طرز استفاده __stdcall ، __cdecl، __fastcall، __thiscallرا بلد نیستم، در MSDN نگاه کردم ظاهرا کامل توضیح داده بود من کلمه کلمه ترجمه کردم ولی آخرش نفهمیدم چی شد، یعنی متوجه نشدم دقیقا وقتی از این ها استفاده می کنی چه اتفاقی می افته ؟ یا یکسری جاها گفته بود اگر در چنین وضعیتی باشید ف استفاده از این بهتره زیرا . . ..

    من نه شرطش را متوجه شدم و نه دلیلش را.

    من توضیحات انگلیسی MSDN را در اینجا ( با لینک کاملش ) قرار می دم ، هرکس که فهمید چی گفته لطفا توضیح بده ( بی زحمت توضیح کامل ) اگر لطف کنید ترجمه دقیق فارسی آن را بگذارید ، من کم کم یاد می گیرم متن انگلیسی بخوانم.

    با تشکر از لطف دوستان-ببخشید اینقدر سوال می پرسما
    __thiscall :


    The __thiscall calling convention is used on member functions and is the default calling convention used by C++ member functions that do not use variable arguments. Under __thiscall, the callee cleans the stack, which is impossible for vararg functions. Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX, and not on the stack, on the x86 architecture.

    One reason to use __thiscall is in classes whose member functions use __clrcall by default. In that case, you can use __thiscall to make individual member functions callable from native code.

    When compiling with [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , all functions and function pointers are __clrcall unless specified otherwise.

    In releases before Visual C++ 2005, the thiscall calling convention could not be explicitly specified in a program, because thiscall was not a keyword.

    vararg member functions use the __cdecl calling convention. All function arguments are pushed on the stack, with the this pointer placed on the stack last

    Because this calling convention applies only to C++, there is no C name decoration scheme.

    On Itanium Processor Family (IPF) and x64 machines, __thiscall is accepted and ignored by the compiler; on an IPF chip, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __fastcall :

    The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible. The following list shows the implementation of this calling convention.

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __cdecl :

    This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention.

    On Itanium Processor Family (IPF) and x64 processors, __cdecl is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    Place the __cdecl modifier before a variable or a function name. Because the C naming and calling conventions are the default, the only time you need to use __cdecl is when you have specified the /Gz (stdcall) or /Gr (fastcall) compiler option. The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option forces the __cdecl calling convention.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition. Given this class definition,

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]

    __stdcall:

    The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl. Functions that use this calling convention require a function prototype.

    The [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] compiler option specifies __stdcall for all functions not explicitly declared with a different calling convention.

    Functions declared using the __stdcall modifier return values the same way as functions declared using [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] .

    On Itanium Processor Family (IPF) and x64 processors, __stdcall is accepted and ignored by the compiler; on IPF, by convention, parameters are passed in register.

    For non-static class functions, if the function is defined out-of-line, the calling convention modifier does not have to be specified on the out-of-line definition. That is, for class non-static member methods, the calling convention specified during declaration is assumed at the point of definition

    [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]



    ---------- Post added at 06:00 AM ---------- Previous post was at 05:58 AM ----------

    می دونی ترجه کلمه کلمه با بابیلون انجام می دم ، مشکلم 2 تاست :
    1. بعضی از کلمات معنای لغوی نمی دهند ، و اصطلاح هستند
    2.جمله بندی به طوری که معنی بده
    برای همینه که از شما خواستم معنای دقیق را هم بنویسید تا بتوانم هی با متن انگلیسیش مقایسه کنم تا دستم بیاد.

    ممنون


    کسی جواب من رو نمی ده

  6. #925
    در آغاز فعالیت
    تاريخ عضويت
    Dec 2007
    پست ها
    8

    پيش فرض

    این خطارا تو اکثربرنامه های اجرایی میده fatal..\includ\iostream.h
    19: ++ error dirctive:must use c
    type iostream.h

  7. #926
    آخر فروم باز
    تاريخ عضويت
    Jul 2009
    پست ها
    6,351

    پيش فرض

    این خطارا تو اکثربرنامه های اجرایی میده fatal..\includ\iostream.h
    19: ++ error dirctive:must use c
    type iostream.h
    سلام
    اگر امكان داره كل كد و نوع كامپايلر هم بگيد .
    نه اين برنامه بلكه هميشه تا سريع تر و راحت تر به شما كمك بشه

  8. این کاربر از Life24 بخاطر این مطلب مفید تشکر کرده است


  9. #927
    پروفشنال moh72's Avatar
    تاريخ عضويت
    Oct 2010
    محل سكونت
    اردبیل
    پست ها
    742

    پيش فرض

    به نظر من تو ویژال استدیو کار کن
    چون اگه با ٰتوبورو C یا جاهای دیگه کار کنی بخاطر محیطش کلا از برنامه نویسی زده میشی
    البته این نظر من بود
    برای شروع هم بو سراغ دستور های
    for
    while
    if
    و تعریف متغیر
    کمکی هم خواستی تا اونجا که بتونم در خدمتم
    موفق باشی
    منظورتون ویزوال بیسیکه؟ چون تا جایی که من میدونم ویژوال استدیو مجموعه است (C+vb+...) اینطور نیست؟

  10. #928
    داره خودمونی میشه Mr Mohabat's Avatar
    تاريخ عضويت
    Mar 2011
    پست ها
    131

    پيش فرض

    منظورتون ویزوال بیسیکه؟ چون تا جایی که من میدونم ویژوال استدیو مجموعه است (C+vb+...) اینطور نیست؟
    نه ویژال استدیو یه برنامه ای هست که زبانهایی مثل C#, VC++, VB.NET رو در خودش داره
    و کد های همه این برنامه ها بسیا شبیه هم هست
    من خودم با C# کار می کنم

  11. #929
    در آغاز فعالیت
    تاريخ عضويت
    May 2011
    پست ها
    1

    پيش فرض

    به نام خدا
    سلام
    می خواستم بدانم برنامه نویسی ##c بهتره یاجاوا برای فردی مثل من که خیلی تازه کارهست؟
    با تشکر

  12. #930
    داره خودمونی میشه babakiyan's Avatar
    تاريخ عضويت
    Apr 2011
    محل سكونت
    تو میدونی.....
    پست ها
    199

    پيش فرض

    فکر کنم c#بهتر باشه
    ولی قبل c#بهتره c++یاد بگیرید......

Thread Information

Users Browsing this Thread

هم اکنون 1 کاربر در حال مشاهده این تاپیک میباشد. (0 کاربر عضو شده و 1 مهمان)

User Tag List

قوانين ايجاد تاپيک در انجمن

  • شما نمی توانید تاپیک ایحاد کنید
  • شما نمی توانید پاسخی ارسال کنید
  • شما نمی توانید فایل پیوست کنید
  • شما نمی توانید پاسخ خود را ویرایش کنید
  •