2021年4月6日星期二

Same cout code in a different place doesn't work

I have a problem where the first cout shows when I remove the // but the second ones doesn't I don't know why, for me there is no obvious reason why this happens is there a reason?

cout << "Please Enter A String: ";  getline(cin, In);  tnc = In.length();    //cout << tnc;  //cout <<"hello"<< nov;    for (int i = 0; i < In.length(); i)  {      if (In[i] == 'a') {          nov++;      }  }  cout << tnc;  cout <<"hello"<< nov;  
https://stackoverflow.com/questions/66978313/same-cout-code-in-a-different-place-doesnt-work April 07, 2021 at 09:08AM

没有评论:

发表评论