How to print out the contents of a vector?

后端 未结 19 1490
旧时难觅i
旧时难觅i 2020-11-22 03:46

I want to print out the contents of a vector in C++, here is what I have:

#include 
#include 
#include 
#include         


        
19条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 04:37

    The problem is probably in the previous loop: (x = 17; isalpha(firstsquare); x++). This loop will run not at all (if firstsquare is non-alpha) or will run forever (if it is alpha). The reason is that firstsquare doesn't change as x is incremented.

提交回复
热议问题