Peak in the tube: Differences in VS2005 and VC6

xiaoxiao2021-04-05  292

When VS2005 debug IPMSG 2.6 source code is found before the VC6 compiles completely no problem (perhaps Warning, not paying attention) is reported to Error, and two cases:

1) The survival period of the temporary variable is no longer extending for (int CNT = 0; .........) {....} cnt = 1; // Works Well in VC6, But Causes Error In vs2005! 2) Function Name Retracence Address to assign a function pointer Class Trecvdlg: public tlistdlg {bool recdirfile (void);

Create a function pointer points to the member function, assign the function name directly to the pointer in VC6: BOOL (TRECVDLG :: * Recvfilefunc) (Void) = TRECVDLG :: Recvdirfile;

However, in VS2005, the function name must be retrieved to the function pointer! Such as: Bool (TRECVDLG :: * Recvfilefunc) (void) = & TRECVDLG :: Recvdirfile;

转载请注明原文地址:https://www.9cbs.com/read-132073.html

New Post(0)