Language: C++

/*
N の 1 の位が 2 , 4 , 5 , 7 , 9 のとき hon 
N の 1 の位が 0 , 1 , 6 , 8 のとき pon 
N の 1 の位が 3 のとき bon
*/

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

int main()
{
  int N;
  cin >> N;
  str = to_string(cin);
  cout << str
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'str' was not declared in this scope; did you mean 'std'?
   15 |   str = to_string(cin);
      |   ^~~
      |   std
a.cc:15:18: error: no matching function for call to 'to_string(std::istream&)'
   15 |   str = to_string(cin);
      |         ~~~~~~~~~^~~~~
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:7:
/usr/include/c++/14/bits/basic_string.h:4240:3: note: candidate: 'std::string std::__cxx11::to_string(int)'
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4240:17: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
 4240 |   to_string(int __val)
      |             ~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4259:3: note: candidate: 'std::string std::__cxx11::to_string(unsigned int)'
 4259 |   to_string(unsigned __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4259:22: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'unsigned int'
 4259 |   to_string(unsigned __val)
      |             ~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4275:3: note: candidate: 'std::string std::__cxx11::to_string(long int)'
 4275 |   to_string(long __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4275:18: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long int'
 4275 |   to_string(long __val)
      |             ~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4294:3: note: candidate: 'std::string std::__cxx11::to_string(long unsigned int)'
 4294 |   to_string(unsigned long __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4294:27: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long unsigned int'
 4294 |   to_string(unsigned long __val)
      |             ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4310:3: note: candidate: 'std::string std::__cxx11::to_string(long long int)'
 4310 |   to_string(long long __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4310:23: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long int'
 4310 |   to_string(long long __val)
      |             ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4327:3: note: candidate: 'std::string std::__cxx11::to_string(long long unsigned int)'
 4327 |   to_string(unsigned long long __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4327:32: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long unsigned int'
 4327 |   to_string(unsigned long long __val)
      |             ~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4401:3: note: candidate: 'std::string std::__cxx11::to_string(float)'
 4401 |   to_string(float __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4401:19: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'float'
 4401 |   to_string(float __val)
      |             ~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4411:3: note: candidate: 'std::string std::__cxx11::to_string(double)'
 4411 |   to_string(double __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4411:20: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'double'
 4411 |   to_string(double __val)
      |             ~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4421:3: note: candidate: 'std::string std::__cxx11::to_string(long double)'
 4421 |   to_string(long double __val)
      |   ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4421:25: note:   no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long double'
 4421 |   to_string(long double __val)
      |             ~~~~~~~~~~~~^~~~~