case flip with given letter separater

so im supposed to be writing a program is able to flip upper case and lower cases based on a given separator letter. The prototype is


string flipCases(string msg, char separator = ‘m’);

and this is what i have so far it works it just doesnt go about it the way its supposed to what can i do to change it so it does please point me in the write direction

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  /*SDVA103 week 8 HW
Jorge Carrera
fall 2015
write a function that is able to flip upper case and lower cases based on a given separator letter.  The prototype is

string  flipCases(string msg, char separator = ‘m’);*/


#include <cstring>
#include <iostream>
using namespace std;

void ChangeCase(char word[]);
string  flipCases(string msg, char separator = ‘m’);



int main()
{
	char word[32] = "ABCDEFGhijklmnopqrstuv"; // declares char size

	ChangeCase(word); // implements function
	cout << word;

	system("pause");
	return 0;
	
}

void ChangeCase(char word[]) // decalring function
{
	for (size_t i = 0; i < strlen(word); i++)
	{
		if (isupper(word[i]))   // if letter is upper then converts to lower
			word[i] = tolower(word[i]);
		else
			if (islower(word[i])) // if letter is lower then converts to upper 
				word[i] = toupper(word[i]);
	}
}
string  flipCases(string msg, char separator = ‘m’)
{
	string flipcases('a' + "A")



}
also the last line was my attempt to add the prototype given in the assignment but couldnt figure it out but left it there to see if i could get some insight
Topic archived. No new replies allowed.