When I examined about <iostream.h>,
-<iostream> and <iostream.h> are different headers.
-It seems that it was abolished in 2006 (or rather, <iostream.h> has never been a part of the standard since the C ++ international standard was enacted in 1998).
-Only char is supported.
The code below uses <iostream> instead of <iostream.h> and adds "using namespace std;" after the #include statement.
And Use Microsoft Visual C ++ 2017, compilation passed.
-
#include "pch.h"
-
#include <iostream>
-
#include<conio.h>
-
#include<iomanip>
-
-
using namespace std;
-
class sorting
-
{
-
private:int n, m[100];
-
public: void getdata();
-
void sort();
-
void display();
-
};
-
void sorting::getdata()
-
{
-
cout << "how many elements?";
-
cin >> n;
-
cout << "enter the elements";
-
for (int i = 0;i < n;i++)
-
cin >> m[i];
-
}
-
void sorting::sort()
-
{
-
int temp, j;
-
for (int i = 0;i < n;i++)
-
{
-
j = i;
-
while (j >= i)
-
{
-
:
-
:
-
Line 17 ("cin >> n;" has been modified to "cin << n;") with the following source,
(Error is "Visual studio: E0349 no operator << matches these operands (but no strings in code)"
Your compilation environment seems very different from mine, so it is unclear if you can use this modified code.