Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>

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:23: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>]'
   23 | 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:23: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>]'
   23 | 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:23: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>]'
   23 | 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:23: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>]'
   23 | 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
      |       ^~~~~