Just a question why do you have the
Code:
int alert() {
string message;
message = "This is an initialized array with a maximum capacity of 255 characters. Have a nice day!\n\n";
cout << message << endl;
return 0;
}
why not just do this instead
Code:
#include <iostream>
#include <string>
using namespace std;
int main () {
string message = "This is an initialized array with a maximum capacity of 255 characters. Have a nice day!\n\n";
cout << "Hey!\nAlert! Alert:\n";
cout << "I'm a C++ program! YAY!\n\n";
cout << message << endl;
cout << "To quit the program, press [ENTER]\n";
cin.get();
return 0;
}
just a note the alert() just seems like a waste of code considering you dont need the extra block of code for it to work. The one I rewrote will work exactly the same as yours it just is one block of code instead of two