warning C4812

Posts 1–2 of 2 · Page 1 of 1
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
          ]
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.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us