-2
オーバーロードされた関数を使用して構造体のファイルを印刷するにはどうすればよいですか?オーバーロードされた関数を使用してファイルを表示
私は、シンボルと配列を出力し、構造体であるファイルを出力する必要がある、過充電関数SHOWを持っています。
#include <iostream>
#include <conio.h>
using namespace std;
void show(char c)
{
cout << "\n Symbol: " << c << endl;
}
void show(int* m, int n)
{
cout << "\n Array: ";
for (int i = 0; i < n; i++)
{
cout << m[i] << ((i == n-1) ? "" : ", ");
}
cout << endl;
}
int main()
{
int m[10] = {16, 78, 99, 6, -29, 19, -52, 65, -88, 51};
show(m, 10);
show('a');
_getch();
}
_overcharged function_ – Tas
あなたは '新しい過負荷'無効ショー(ファイル*のMY_FILE)を提供する必要があります。何を試しましたか? – GeorgeAl
@GeorgeAlとそれが主な機能にどのようにあるでしょうか? – Neon