cout << order of call to functions it prints?
问题 the following code: myQueue.enqueue(\'a\'); myQueue.enqueue(\'b\'); cout << myQueue.dequeue() << myQueue.dequeue(); prints \"ba\" to the console while: myQueue.enqueue(\'a\'); myQueue.enqueue(\'b\'); cout << myQueue.dequeue(); cout << myQueue.dequeue(); prints \"ab\" why is this? It seems as though cout is calling the outermost (closest to the ;) function first and working its way in, is that the way it behaves? 回答1: There's no sequence point with the << operator so the compiler is free to