VS2010学习版cout的一个问题
DataType x;
...
SeqQueueDelete(&S, &x);
cout << "the queue after delete the front item: " << x << endl;
运行程序一闪而过,在cout那句打断点后F11,一执行就会跑到这里:
template<class _Traits> inline
basic_ostream<char, _Traits>& operator<<(
basic_ostream<char, _Traits>& _Ostr,
const char *_Val)
{ // insert NTBS into char stream
typedef char _Elem;
typedef basic_ostream<_Elem, _Traits> _Myos;
SeqQueueDelete的定义如下:
int SeqQueueDelete(SeqQueue *Q, DataType *x)
{
if ( SeqQueueIsEmpty(*Q) )
{
cout << "SeqQueue empty, cant's delete. " << endl;
exit(0);
}
else
{
*x = Q->data[Q->font];
Q->font = (Q->font + 1) % MAX_SIZE;
Q->count--;
}
return 0;
}