Return value for function

I'm trying to write a program to list the notes in a scale, based on input from the user. Here's what I've got so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<iostream>
#include<string>

using namespace std;

string notes [12] = { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" };

void scale() {
	string scalechoice;
	cin >> scalechoice;
	if (scalechoice == "Cmaj")
	cout << notes[0] << ", " << notes[2] << ", " << notes[4] << ", " << notes[5] << ", " << notes[7] << ", " << notes[9] << ", " << notes[11] << ", " << notes[0] << endl;
}

int main()
{
	string selection;
	cout << "Which scale would you like? ";
	void scale();
	system("PAUSE");
	return 0;
}


I'm having a problem with the function I wrote not actually doing anything, and I think it's because I don't have a return value set when I call for the function, but I can't figure out what the return value should be. Any suggestions? Thanks in advance.
In your main() function, try changing
void scale();
to
scale();
Awesome, that was it. Thanks a ton catcat.
Topic archived. No new replies allowed.