السلام عليكم
هل هناك من مر عليه مثل هذا الخطا حاولت فهمه ولكن :S
Compiler Error C2558'identifier' : no copy constructor available or copy constructor is declared 'explicit'
A copy constructor initializes an object from another object of the same type. (It makes a copy of the object.) The compiler generates a default copy constructor if you do not define any constructors.
Possible cause
- Trying to copy a class whose copy constructor is private. In most cases, a class with a private copy constructor should not be copied. A common programming technique declares a private copy constructor to prevent the direct use of a class. The class may be useless by itself or require another class in order to work properly.
- Trying to copy a class whose copy constructor is <A id=ctl00_rs1_mainContentContainer_ctl01 onclick="java script:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl01',this);" href="http://msdn.microsoft.com/en-us/library/h1y7x448(VS.71).aspx">explicit. Declaring a copy constructor with explicit prevents passing/returning objects of a class to/from functions.
Possible solution
- If you determine that it is safe to use a class with a private copy constructor, derive a new class from the class with a private constructor and make a public or protected copy constructor available in the new class. Use the derived class in place of the original.
خاصة وانه ما يطلع هالخطا في نفس الكلاس)ب( اللي يشير له الخطا لا يطلعه في كلاس ثاني)ق( متضمن فيه الاول)ب)2.
كلاس (ب) يوجد بداخله copy constructor
اما كلاس (ق) فلا يوجد بداخله
ياليت اللي عنده فكره ينورني فيها الله ينور عليه بقبره
فاصلة.......
الجد استفدت من هالمنتدى ما ليس بالقليل فأرجو من الله العلي القدير ان افيد احد غيري