Thread: warning C4812

Results 1 to 2 of 2
  1. #1
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6

    warning C4812

    I'm Getting this warning anyone have any suggestions into fixing it..

    main.h

    Code:
    #ifndef Main_H
    #define Main_H
    
    template<class T>
    class MsgMarker
    {
    public:
    	MsgMarker( Message_Block* msg )
    	{
    		mark_ = (T*)msg->wr_ptr();// writes the pointer to mark_
    	}
    
    	// Get mark value.
    	T		get_value() { return *mark_; }
    
    	// Set mark value.
    	void	set_value( T value ) { *mark_ = value; }
    
    	T*		mark_;
    };
    #endif//Main_H
    main.cpp

    Code:
    int main( int argc, char* argv[] )
    {
    
    		Message_Block* msg = message_block_factory->create();
                    MsgMark<u_char> num_mark( msg );
    		u_char count = 0;
    		MSG_SET_UCHAR( msg,  count ); // sets the uchar
                    num_mark.set_value( count );
    		num_mark.MsgMark<u_char>::MsgMark<u_char>(msg); // warning error here...
               
                    return 0;
    }
    telling me

    Code:
    warning C4812: obsolete declaration style: please use 'MsgMark<T>::MsgMark' instead
    with
              [
                  T=u_char
              ]
    Last edited by faceofdevil; 05-07-2012 at 05:04 PM.

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    I think it wants you to drop this part
    num_mark.MsgMark<u_char>::MsgMark<u_char>(msg);

    as in:
    num_mark.MsgMark<u_char>::MsgMark(msg);

    I'm tired as fuck so no idea if that's it.
    Ah we-a blaze the fyah, make it bun dem!

Similar Threads

  1. [WARNING]Do never post ur real username
    By System79 in forum WarRock - International Hacks
    Replies: 20
    Last Post: 06-07-2007, 06:19 AM
  2. Friendly Warning.
    By Waffles in forum WarRock - International Hacks
    Replies: 22
    Last Post: 02-24-2007, 07:37 AM
  3. [Warning] Very Disturbing anime.
    By SadisticGrin in forum Art & Graphic Design
    Replies: 12
    Last Post: 12-31-2006, 06:51 PM
  4. Severe Warning to those who want to make a private server
    By Rocker1989 in forum Gunz General
    Replies: 14
    Last Post: 04-30-2006, 05:34 PM
  5. [WARNING] there are trolls on MPGH
    By Kyojiro in forum General
    Replies: 24
    Last Post: 01-27-2006, 07:02 PM