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
/*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>
usingnamespace 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]);
elseif (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