Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{

	string str;
	getline(cin, str);
	
vector<string> vStr;

	while (str.find(' ') != -1 )
	{
		vStr.push_back(str.substr(0,str.find(' ')));
		str.erase(0, str.find(' ') + 1);
	}
	vStr.push_back(str);

cout << atoi(vStr.at(0).c_str) * atoi(vStr.at(1).c_str) << " " << atoi(vStr.at(0).c_str) * 2 + atoi(vStr.at(1).c_str) * 2 << endl;

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   22 | cout << atoi(vStr.at(0).c_str) * atoi(vStr.at(1).c_str) << " " << atoi(vStr.at(0).c_str) * 2 + atoi(vStr.at(1).c_str) * 2 << endl;
      |              ~~~~~~~~~~~^~~~~
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:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:22:50: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   22 | cout << atoi(vStr.at(0).c_str) * atoi(vStr.at(1).c_str) << " " << atoi(vStr.at(0).c_str) * 2 + atoi(vStr.at(1).c_str) * 2 << endl;
      |                                       ~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:22:83: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   22 | cout << atoi(vStr.at(0).c_str) * atoi(vStr.at(1).c_str) << " " << atoi(vStr.at(0).c_str) * 2 + atoi(vStr.at(1).c_str) * 2 << endl;
      |                                                                        ~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:22:112: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   22 | cout << atoi(vStr.at(0).c_str) * atoi(vStr.at(1).c_str) << " " << atoi(vStr.at(0).c_str) * 2 + atoi(vStr.at(1).c_str) * 2 << endl;
      |                                                                                                     ~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~