How can I make a while loop take in both arguments and not just one?
My code:
int main() { int a = 1; int x = 0; while (x == 0 && a == 0) { std::cout << "text1" << std::endl; x++; } std::cout << "text2" << std::endl; }
This should printing out text1
all the time (constantly), but it does not. Instead, it skips the whole loop and prints out text2
.
没有评论:
发表评论