Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
	string str;
	int cnt;
	while(cin >> str, 1){
		int x = 0;
		for(int i　=　0;　i　<=　(int)str.size();　i++){
			if('0'　<=　str[i]　&&　str[i]　<=　'9'){
				x　=　x * 10 + (str[i] - '0');
    		}else{
      			cnt += x;
      			x = 0;
    		}
    	}
	}
	cout<<cnt<<endl;
	return 0;
}


Compiler output:
a.cc:10:25: error: extended character 　 is not valid in an identifier
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                         ^
a.cc:10:29: error: extended character 　 is not valid in an identifier
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                             ^
a.cc:10:33: error: extended character 　 is not valid in an identifier
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                 ^
a.cc:10:33: error: extended character 　 is not valid in an identifier
a.cc:10:40: error: extended character 　 is not valid in an identifier
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                        ^
a.cc:10:58: error: extended character 　 is not valid in an identifier
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                                          ^
a.cc:11:28: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                            ^
a.cc:11:35: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                                   ^
a.cc:11:43: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                                           ^
a.cc:11:47: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                                               ^
a.cc:11:55: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                                                       ^
a.cc:11:59: error: extended character 　 is not valid in an identifier
   11 |                         if('0'　<=　str[i]　&&　str[i]　<=　'9'){
      |                                                           ^
a.cc:12:33: error: extended character 　 is not valid in an identifier
   12 |                                 x　=　x * 10 + (str[i] - '0');
      |                                 ^
a.cc:12:37: error: extended character 　 is not valid in an identifier
   12 |                                 x　=　x * 10 + (str[i] - '0');
      |                                     ^
a.cc: In function 'int main()':
a.cc:10:29: error: '\U000030000' was not declared in this scope
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                             ^~~
a.cc:10:33: error: '\U00003000i\U00003000' was not declared in this scope; did you mean 'i　'?
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                 ^~~~~
      |                                 i　
a.cc:10:43: error: expected primary-expression before 'int'
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                           ^~~
a.cc:10:40: error: '\U00003000' was not declared in this scope; did you mean 'i　'?
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                        ^~
      |                                        i　
a.cc:10:47: error: expected ';' before 'str'
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                               ^~~
      |                                               ;
a.cc:10:55: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                               ~~~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
a.cc:10:57: error: expected ')' before ';' token
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                    ~                                    ^
      |                                                         )
a.cc:10:58: error: '\U00003000i' was not declared in this scope
   10 |                 for(int i　=　0;　i　<=　(int)str.size();　i++){
      |                                                          ^~~