I have been messing around with C++ for awhile but in a class room setting and apparently the things that they are doing there are VERY WRONG!!
The code I have is simple, but I get [Linker error]undefined reference to Selection(char) when I compile.
Code:
#import <iostream>
#import "guitar.h"
using namespace std;
//function prototypes
char Selection(char choice);
int ESection();
int main()
{
//declare variables
char choice;
cout<<"\n\n"; //print 2 blank lines
cout<<head << "\n\n" << head2;
choice = Selection(choice);
system("PAUSE");
}
my header:
Code:
using namespace std;
char Selection()
{
//declare variables
char select;
//This function display a list of choices to the user
cout<<"Please select a category: \n\n";
cout<<"E Section A#/Bb Section\n";
cout<<"F Section B Section\n";
cout<<"F#/Gb Section C Section\n";
cout<<"G Section C#/DB Section\n";
cout<<"G#/Ab Section D Section\n";
cout<<"A Section D#/Eb Section\n";
cout<<"Enter: ";
cin.get(select);
return select;
}
A kick in the right direction would be great. I read posts here and googled it but I am still unsure of what the solution is.