okay I got as far as this:
Code:
#include <string>
#include <iomanip>
using namespace std;
void printHeader(string prog, string date){
cout<<"\n\n";
cout<<"+-------------------------------------------------------------------+\n";
cout<<"| = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = |\n";
cout<<"|{}.-------------------------------------------------------------.{}|\n";
cout<<"|: | | :|\n";
cout<<"| :|=MyNameHere || Created: "<<date<<" || Modified: 00-00-00=|: |\n";
cout<<"|: | | :|\n";
int SizeOfProg = prog.length();
int NumSpaces = (50 - SizeOfProg) / 2; // 50 - Length of prog, halved
cout<<"| :|"<<printSpaces(NumSpaces)<<prog<<printSpaces(NumSpaces)<<" |: |\n";
cout<<"|{}.-------------------------------------------------------------.{}|\n";
cout<<"| = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = |\n";
cout<<"+-------------------------------------------------------------------+\n\n\n";
}
void printSpaces(int NumSpaces)
{
int X = 0;
while(X != NumSpaces)
{
cout << ' ';
X++;
}
}
the only thing i changed was strlen(prog) to prog.length() because it didnt recognize the other function. The error I am getting is: implicit declaration of function 'int printSpaces(...)' As I am very new to using functions (just started this in class yesterday) I have no idea what this means, any help much appreciated.