User Profile

Collapse

Profile Sidebar

Collapse
themadme
themadme
Last Activity: Feb 3 '13, 08:13 PM
Joined: Mar 28 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • First thanks zmbd for formatting the code, my bad and thank you very much Banfa for the insight reply.

    I'm trying to remember why I used the static key word in the first place, anyway I removed the static key words as recommended as well then placed the inline keyword for template specialization function to prevent complier errors.

    I think I may need to and read over Bjarne Stroustrup The C++ Programming Language
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic Explicit Specialization cannot have a storage class
    in C

    Explicit Specialization cannot have a storage class

    Hi there,

    I am porting code from windows using visual studio to mac with xcode.

    Quite a lot of issue have a appeared, which is no surprise, one warning that keeps on appearing is Explicit Specialiszation cannot have a storage class:

    Code:
    enum SortReturnCodeEnum {LOWEST=1, HIGHEST=2, HIGHLOW = 3, IDENTICAL=4};
    template<typename tKey>
    static SortReturnCodeEnum DefaultCompare(typename ArgType<tKey>::ARGT
    ...
    See more | Go to post
    Last edited by zmbd; Jan 31 '13, 09:06 PM. Reason: [Z{Please use the [CODE/] button to format posted script}]

  • Started a new clean slate of code and now it works ... i have no idea what sill mistake i did previously lol. Oh well thanks for your help Banfa :)
    See more | Go to post

    Leave a comment:


  • hmmm interesting .. why am i still getting errors. Im going to do a few more tests tonight and find out why im getting errors. Thanks for the reply
    See more | Go to post

    Leave a comment:


  • thanks for the reply banfa but sadly to say, i have already done this and i still receive the "Error 8 error C2955: 'Lex::Maths::He lper' : use of class template requires template argument list"

    but it did remove the "Error 10 error C2670: 'Lex::Maths::He lper<T>::setNaN ' : the function template cannot convert parameter 1 from type" errors
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic class template with static member functions problem
    in C

    class template with static member functions problem

    Hi there,


    I'm having a little bit of a problem and hopefully some one can help me.

    I have not programmed in c++ for a while so excuse me for being silly

    My problem involves with me creating a template class with static inlined member functions.

    E.g.

    LEX_INLINE is just a typedef for __forceinline
    DllExport is a typedef for __declspec( dllexport )
    Code:
    template<class
    ...
    See more | Go to post

  • themadme
    replied to to pass in a unknown data and retrieving it
    in C
    lol ok, new prob, will actually it not a problem yet.

    I would just some comments back to see what i'm doing is correct.


    Code:
    //////////// this would be done on both sides of the server and the client
    #define BUFFERSIZE 80
    
    struct PacketData
    {
    	float x,y,z;
    
    }S_PacketData;
    
    struct Data
    {
    	char *pcPacket;
    	char *cpName;
    }S_Data;
    ...
    See more | Go to post

    Leave a comment:


  • themadme
    replied to to pass in a unknown data and retrieving it
    in C
    oops found the problem, such amateur mistake, im only coping over one byte of data. someone slap me
    See more | Go to post

    Leave a comment:


  • its quite simple, all you would need is a class that holds float values for a matrix ( _x1, _x2, and so on)

    then you would need to put overloaded operator functions in that class for adding, subtracting etc.

    for more info, just look up at directx SDK and LEARN how that has been done or as r035198x's said look up text books.
    See more | Go to post

    Leave a comment:


  • themadme
    replied to to pass in a unknown data and retrieving it
    in C
    Thanks for the replies and sorry about the bad naming in the last example

    would that be the same problem if put a structure into a buffer.

    Code:
    //// class called Data
    Data::Data()
    {
        char *pcPacket = new char;
    }
    
    void Data::setPacketData( const char* pcPacketData )
    {
        *pcPacket = *pcPacketData;
    }
    
    void Data::getPacketData( const char*
    ...
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic to pass in a unknown data and retrieving it
    in C

    to pass in a unknown data and retrieving it

    i want to set a class back to its original structure after calling a receive function. code below to explain

    Code:
    class Node
    {
    	public:
    	Node(){}
    	~Node(){}
    };
    
    
    class lol  : public Node
    {
    	public:
    	string strName;
    };
    
    class face
    {
    	public:
    
    	void vSetLOL( CONST Node &C_lol )
    	{
    		this->C_lol
    ...
    See more | Go to post

  • themadme
    replied to Searching for servers
    in C
    thank kindly for your reply.

    Though i think i migth just use broadcasting, since im just working on the local network rather than the interent.

    So is there any guides on how to do broadcasting as well as does anyone know if there are different ways for a client to search of a server?
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic Searching for servers
    in C

    Searching for servers

    Hi.

    IN my application i want to have clients to search for a server with a certain name.

    I am using WinSock, c++.

    i have read about using WSASERVICECLASS INFO and WSANSCLASSINFO to create a service class

    has anyone done any of that or did something differently?

    Please Help

    thanks
    See more | Go to post

  • themadme
    replied to UDP Select() TCP
    in C
    thank you, much appreciated.
    See more | Go to post

    Leave a comment:


  • themadme
    replied to UDP Select() TCP
    in C
    TCP version:

    Code:
    Server *pServer = (Server*)pParam;
    	SOCKET socketClient;
    	do
    	{
    		socketClient = accept( *pServer->p_socketServer, 0, 0 );
    
    		if ( socketClient == SOCKET_ERROR || pServer->usNumberOfClients >= pServer->usMAX_CLIENTS ) 
    		{
    			// send an error code to client //////////////////////////////////////
    			closesocket( socketClient );
    		}
    ...
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic UDP Select() TCP
    in C

    UDP Select() TCP

    hi. ok my problem is that i have been using TCP for a while and now i want to change to UDP. Im using the select I/0 method.

    i have a listening thread like this :
    Expand|Select|W rap|Line Numbers

    1. void Server::vListen ingThread( LPVOID pParam )
    2. {
    3. Server *pServer = (Server*)pParam ;
    4. SOCKET socketClient;
    5. do
    6. {
    7. ...
    See more | Go to post

  • themadme
    replied to Select() UDP and TCP
    actually ill just create a new one on c++ forums. this can be deleted
    See more | Go to post

    Leave a comment:


  • themadme
    replied to Select() UDP and TCP
    well yeah, im using WinSock, thought it would more suitable for the network forums. Ok please move it to the c++ forums
    See more | Go to post

    Leave a comment:


  • themadme
    started a topic Select() UDP and TCP

    Select() UDP and TCP

    hi. ok my problem is that i have been using TCP for a while and now i want to change to UDP. Im using the select I/0 method.

    i have a listening thread like this :
    Code:
    void Server::vListeningThread( LPVOID pParam )
    {
    	Server *pServer = (Server*)pParam;
    	SOCKET socketClient;
    	do
    	{
    		socketClient = accept( *pServer->p_socketServer, 0, 0 );
    
    		if ( socketClient == SOCKET_ERROR
    ...
    See more | Go to post

  • themadme
    replied to preprocessor
    in C
    thank you very much, you have been very helpful, thanks again
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...