Stray '\342' in C++ program

后端 未结 4 457
小蘑菇
小蘑菇 2020-12-10 02:47

I\'m getting these errors in my program after pasting in some code:

showdata.cpp:66: error: stray ‘\\342’ in program         


        
4条回答
  •  攒了一身酷
    2020-12-10 02:58

    The lines

     size_t startpos = str.find_first_not_of(” \t”); 
     size_t endpos = str.find_last_not_of(” \t”); 
    

    have some "special" kind of double quotes, try the following:

     size_t startpos = str.find_first_not_of(" \t"); 
     size_t endpos = str.find_last_not_of(" \t"); 
    

提交回复
热议问题