I'm trying to get the hang of the declaration and use of char. I'm trying to write a program that reads sentences from the user and changes them based on their character choices, I keep getting a buttload of compiler errors.......am I off to a good start or am I way off?
#include<iostream>
#include<string>
#include<cstring>
#include<cctype>
using namespace std;
int main()
{
char *quit*;
char sentance [100];
cout << "Welcome to editor. Please enter your first sentance or *quit* to end." <<endl;
cin >> sentance >>endl;
if (sentance = *quit*)
{
return 0;
}
else
{
cout << "We're gonna have a little fun.\n Im going to give you three choices.\n Each one of these will alter a sentance in a different way." <<endl;
cout << "Enter H for option 1, R for option 2, or U for option 3" <<endl;
{
char replace;
char reverse;
char change;
I changed the code a bit and got farther .....sorry to sound stupid but I am very new to this and I'm trying everything I can read in my book and online.
It compiled when I changed the code to this:
#include<iostream>
#include<string>
#include<cstring>
#include<cctype>
using namespace std;
int main()
{
char quit;
char sentance [100];
cout << "Welcome to editor. Please enter your first sentance or *quit* to end." <<endl;
cin.get();
if (quit = )
{
return 0;
}
else
{
cout << "We're gonna have a little fun.\nIm going to give you three choices.\nEach one of these will alter a sentance in a different way." <<endl;
cout << "Enter H for option 1, R for option 2, or U for option 3" <<endl;
{
char replace;
char reverse;
char change;
#include<iostream>
#include<string>
#include<cstring>
#include<cctype>
usingnamespace std;
int main()
{
char quit;
char sentance [100];
cout << "Welcome to editor. Please enter your first sentance *quit* to end." <<endl;
cin.get();
if (quit = )
{
return 0;
}
else
{
cout << "We're gonna have a little fun.\nIm going to give you three choices.\nEach one of these will alter a sentance in a different way." <<endl;
cout << "Enter H for option 1, R for option 2, or U for option 3" <<endl;
{
char replace;
char reverse;
char change;
}
return 0;
}
}