Download

Quick question for pointers and referencies

Hi!



    FTurnBased_QueueElem *currentTop;
    FTurnBased_QueueElem *testElement;
    FTurnBased_QueueElem tempElem;


Can this:



                    memcpy(&tempElem, currentTop, sizeof(TurnBased_QueueElem));
                    memcpy(currentTop, testElement, sizeof(TurnBased_QueueElem));
                    memcpy(testElement, &tempElem, sizeof(TurnBased_QueueElem));


be rewritten as:



                    tempElem = &currentTop;
                    currentTop = testElement;
                    testElement = &tempElement;


??