whats wrong with this

it says the error is on the underlined piece of code

#include <iostream>
#include <string>

using namespace std;

int main(){
char question[] = "enter a password you want to encypt" << endl;[/b]
char password[60];
cout << question;
cin >> password;

system("pause");
return 0;

}
go to the first 1
You cannot have << endl when initializing an string array.

If you want a new line do this: char question[] = "enter a password you want to encypt\n";
Topic archived. No new replies allowed.