i want print this image out...

10 11
___
/ ()\
_|_____|_
| | === | |
|_| o |_|
|| o ||
||__*__||
|~ \___/ ~|
/=\ /=\ /=\
[_] [_] [_]

#include <iostream>
#include<fstream>
#include<string>

using namespace std;

int main()
{
	string filename;
	int number;
	
	cout<<"enter the name of the file"<<endl;
	cin>>filename;
	
	int *rows;

	ifstream inputFile;
	inputFile.open(filename.c_str());
	
	inputFile>>number;

	rows = new string[number];

	for(int count=0;count<number;count++)
	{
		getline(inputFile,rows[i]);
	}

	return 0;
}

i am getting a compiler error can anyone tell me whts wrong with it?

int *rows;

Replace this by

string *rows;

Because you can't convert int* to string*

getline(inputFile,rows[i]);

Can't forget the

for(int i=0;;++i)

?

getline(inputFile,rows[count]);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.