Code:
#include <iostream>
#include <string>
void main ()
{
char studentId[7] = "";
short numOfChars = 0;
cout << "Enter Student ID: ";
cin.getline(studentId, 7);
numOfChars = strlen(studentId);
if(numOfChars == 6)
if(stricmp(studentId, "ABC123") == 0)
cout << "\nAccepted";
else
cout << "\n Not Accepted" << endl;
else
cout << "The Student ID must be atleast 6 chars" << endl;
//endif
}
Hi,
I am getting 4 errors with this and I have spent long time but cannot see my errors.
It gives four sayin that the cin and cout are undeclared identifiers?