FIX: ?? ??????? ?????? ????? ?? ??? "??? ????? ?? ????? ?? ????" directive ????? ?????? ?? ???? ????? ??

???? ?????? ???? ??????
???? ID: 192539
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ??? "??? ????? ?? ????? ???? ??? ????" ???? ?? ???? ?? ????? ?????? declaration directive ??? ??, ?? ????? ?? ????????? ??? ?? ??? ?? ??????? ?? ???? ??:

?????? 1
C2248 ??????: [????? ?? ???]: ???? ????? ???? ????? declared ??? ???? [???? ???] [???] (???? ???????): [????? ??] ?? declaration ?????
?????? 2
[???](???? ???????): C1001 ????? ??????: ?????? ??????? ??????

(??????? ????? 'msc1.cpp', ?????? 1786)
????? ????? C++ ??? ???? ?? ?????? ?????? ???? ?????, ?? ?? ???? ??????? ?? ??? ?????? ?????? ??? ????? ??????

?????? cl.exe ????????? ?? ??? ???

????

????? ?????? ??????????? ???? front-end ??????? ??? ?? ???? ???????? ???????? ???

????????

?? Microsoft ?? ?? ??????? ???????? ?????? ??, ?? ?? ???? ??? ?????? ?? ?? ???? ?? ??? ?? ????? ????? ?? ???? ??? ??? ??.. ??? ???? ????? ???????? ?? ???? ???? ?? ?? ??????? ?????? ?? ????? ?? ??? ???.. ?? ???????? ?? ??? ???????? ??????? ??? ?? ???? ???.. ?????, ??? ?? ?? ?????? ?? ???? ??? ???????? ???? ???, ?? ?? ????? ????? ?? ?? Visual Studio 6.0 ?????? ?? ???????? ????? ???? ?? ??? ???? ?????? ??? 3 ?? ??? ????????? ???

?? ?????? ?? ????? ?? ???? ?? ???, ???????? ??????? ???? ?? ??? Microsoft ?????? ?????? ???? ?? ?????? ????.. Microsoft ?????? ?????? ?????? ?? ??? ?????? ?? ???? ?? ??? ?? ?????? ????? ?? ???? ??? ??????? ?? ???, ????? Microsoft ??? ???? ?? ????::
http://support.microsoft.com/contactus/?ws=support
???:????? ?????? ???, ?? ????? ?? ?????????? ?????? ???????? ?? ???? ???? ??? ???? ??? ?? ???? ???, ??? ??? Microsoft ?????? ????????? ????????? ???? ?? ?? ??? ??????? ?????? ???? ?????? ?? ?????? ?? ???? ??.. ???????? ?????? ???????? ?? ?? ???????? ?? ??? ??????? ?????? ????? ???? ????? ?? ?? ??????? ?????? ?? ??????? ???? ????..?? ?????? ?? ???????? ??????? ??? ???? ?? ?? ????? ????????? ?? ???? ??? ?? ???? ?????::
   Date      Time      Size        File Name  Version#      Platform
   -----------------------------------------------------------------

   9/15/98   08:26p    1,183,795   C1xx.dll   12.00.8257.0  (x86)
				

????? ?????????

?? ?????? ?? ?? ???? ?? ??? ????? ??? ?? ??? ?? ????? ????:
  • ?? ???? "??? ????? ?? ????? ???? ??? ????" directive ????? ?????? declaration ?? ????
  • ?? ????? ?? ???? "??? ????? ?? ????? ???? ??? ????" directive.
  • ?????? ??/?? ???? ??? ??????

??????

Microsoft ?? ?????? ?? ?? ?? "?? ?? ????" ???? ??? ???????? Microsoft ???????? ??? ?? ?? ??? ??..?? ?? ?? ???? Visual Studio 6.0 ?????? ??? 3 ??? ??? ???? ??? ???

Visual Studio ?????? ??? ?? ???? ??? ???? ??????? ?? ??? ?????? ?? Microsoft ???????? ??? ????? ?? ??? ????? ???? ???????? ?? ????? ????:
194022????? Studio 6.0 ???? ???, ????, ????, ?????
194295???? Visual Studio ?????? ??? ??????? ?? ????? ???? ????

???? ???????

Test1.cpp reproduces 1 ?????? ??? C2248 ??????

   // test1.cpp
   // Compiler options needed: cl /c /GX
   #include <iostream>

   using namespace std;

   #ifdef WORKAROUND
   class CMyClass;
   ostream& operator <<(ostream &, const CMyClass &);
   #endif // WORKAROUND

   class CMyClass
   {
   public:

     friend ostream& operator <<(ostream &, const CMyClass &);
     // An alternative workaround is to define the operator in the
     // class declaration. In this case it is not necessary to forward
     // declare the class and friend function.

   private:

      int value;
   };

   ostream& operator <<(ostream& out, const CMyClass& m)
   {

      int i = m.value;  // C2248 Error
      return out;
   }

   void main()
   { }
				

Test2.cpp reproduces ?????? 2 ??? C1001 ??????

   // test2.cpp
   // Compiler options needed: cl /c /GX
   #include <iostream>

   using namespace std;

   #ifdef WORKAROUND
   int operator+(int, const class &);
   #endif // WORKAROUND

   class CMyClass
   {
   public:

     friend int operator+(int, const CMyClass &);  // C1001 Error.

   };

   void main()
   { }
				

???

???? ID: 192539 - ????? ???????: 02 ?????? 2010 - ??????: 4.0
??????: 
kbhotfixserver kbqfe kbbug kberrmsg kbfix kblangcpp kbvs600sp3fix kbmt KB192539 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:192539

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com