0
strrevの文字列を入力して、ユーザが文字列を入力したときに何らかの理由で文字列を入力できないようにしたいと考えています。出力はnatsだけです、どうすれば空白を受け入れることができますか?strrevを使用してC++で文字列を正しく逆転する
#include<iostream>
#include <cstring>
#include<string.h>
using namespace std;
int main()
{
char str[] = "This is a c-StyleString";
//cout <<"Enter the string:" << endl;
//cin >> str;
cout << "Reverse of the given string is: " << strrev(str);
return 0;
}
strrevの使用が必要な学校の割り当てであり、助けを求めているだけです。 – Beeeee
@Beeeee、私は真剣に、冗談なし! – SergeyA