please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file

using namespace std;

int main()
 char y, n; 
 ifstream file1;
 ifstream file2;
 string filename1;
 string filename2;
 string c;
 int number;
 int choice;

cout<<"xxxxxxx matrix calculator \n";
cout<<"please choose from the following menu :\n";

 cout<<"1. matrix addition\n";
 cout<<"2. matrix subtraction\n";
 cout<<"3. matrix multiplication\n";
 cout<<"4. matrix transpose\n";
 cout<<"5. checking matrix equality\n";
 cout<<"6. check matrix properties\n";
 cout<<"7. matrix power\n";
 cout<<"8. exit\n";
 cout<<"please enter your choice\n";

 while(//condition when there is character)// for the first file and the second one :D
                            cout<<"invalid file!!\n";
                            cout<<"do you want to continue (y) or return to menu(n)\n"; 
/* "y" to continue to try to enter the file name again & "n" to go back to the menu*/
                             cout<<"please enter the first filename\n";
                          else if(choice1=='n')

 case 1 :
 case 2 :
 case 3 :
 case 4 :
 case 5 :
 case 6 :
 case 7 :
 case 8 :
      cout<<"thank you for using my program\n";

 system ("pause");
 return 0; 

First of all: a thread called helpzz plzzz fast cuz im NOOB, is not really a great way to explain your problem. Clear titles make people help you faster.

Next: Please use code tags. It makes your code easier to read

Please click

Then for your program. There are quite a lot of things wrong with it.
For example: char y,n; you are declaring 2 chars named 'y' and 'n', but they never get a value. Choice never gets a input. What you want is something like:

char choice = 'x'; //give it some value
	while (choice < '0' || choice > '8') 	
               choice = cin.get(); // loop until good input

Adjust the code above to fit your program.

Say it bro, say it loud and often!
This article has been dead for over six months. Start a new discussion instead.