0

hello, i wrote a little program, but There are some problems.
Can anyone help me?

here is the code:

#include <iostream>
#include <math.h>
#include <fstream>

using namespace std;


bool tikrinimas(const char *filename)
{
  ifstream failas(filename);

  return failas;
}


int main ()
{
	tikrinimas("example.txt");
	
	bool failas;

	if (failas==true)

{cout << "good";}

else
{cout <<"bad";}


system("PAUSE");
return 0;
}

Edited by marrkee: n/a

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Narue
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.