Code:
char selection, 'W', 'D', 'F'; // W T F? :p remove the single quotes..
// ...
if (selection = W) // this will assign W to selection, to compare variables use ==
cout << "You have chosen While" << endl;
// use an if-else block:
else if (selection = D)
cout << "You have chosen Do While" << endl;
else if (selection = F)
cout << "You have chosen For" << endl;
I think the OP wants something akin to this.
Code:
char selection;
// ...
if (selection == 'W') // this will assign W to selection, to compare variables use ==
cout << "You have chosen While" << endl;
// use an if-else block:
else if (selection == 'D')
cout << "You have chosen Do While" << endl;
else if (selection == 'F')
cout << "You have chosen For" << endl;
[edit] As robwit said. [/edit]
Code:
#include<stdlib.h> // you shouldnt need this, remove it.
Actually, it is needed if you use system(). In C++, it should be <cstdlib>, though.
Code:
void DisplayBanner(); // i moved your function prototypes outside and above main (where they need to be)
int PromptUserForSelection(); // side note, i wouldnt start my function (or variable) names \
with capitals, use something like displayBanner and promptUserForSelection instead
Function prototypes can be present in any block. If they are, their scope is limited to that block. This means that if you put some prototypes in main(), those functions will be prototyped within main(), but inside other functions they will not be.
As for the capitalization, there are many programming styles. Many programmers I can think of like using camel notation (that's thisIsAnIdentifier) with initial capitals. I prefer "underscore notation" myself: this_is_an_identifier. There are as many styles as there are programmers. Well, there would be if there weren't some standards. But you can use whatever style you like, but please be consistent.