Answer:
Following are the statement in the c++ language
ifstream inFile; // declared a variable inFile
ofstream outFile;
//declared a variable outFile
Explanation:
The ifstream and ofstream is the file stream object in the c++ Programming language .The ifstream file stream object is used for reading the contents from the file whereas the ofstream file stream object is used for writting the contents into the file.
- We can create the variable for the ifstream and ofstream These variable is used for reading and writing into the File.
- Following are the syntax to create the ifstream variable and ofstream variable
ifstream variablename;
ofstream variablename
Answer:
In opp friend function is a function that gives the same access to private and protected data. It is declared in class that is granting access.
Explanation:
#include<iostream.h>
using namespace std;
class Sum
{
int a, b, add;
public:
void input()
{
cout << "Enter the value of l and m:";
cin >> l>>m; taking input from users
}
friend void add(sum &t);
void display()
{
cout << "The sum is :" << z;
}
};
void add(sum & p)
{
p.add = p.a + p.b;
}
int main()
{
sum p1;
p1.input();
add(p1);
p1.display();
return false;
if(display==5)
{
return true; //true is returned if sum is equal to 5
}
else //if they are not the same
{
return false;
}
}
Answer:
maybe try Y o u t u b e
Explanation:
sometimes they have full episodes of shoes on there for free
Michigan technological University