Please help, I am new to programming, and I am trying to find the answer in my books and on the web but can't seem to find it. I wrote a program
include <iostream>
include <string>
using namespace std;
int main ()
{
string name;
string subject;
cout << "Welcome to Holly's Crystal Ball!" << endl;
cout << "What is your name, please?" ;
cin >> name;
cout << "Hello, " << name << ". My name is Holly." << endl;
cout << "What subject are you studying?" ;
cin >> subject;
cout << "Well, " << name << ", Holly's crystal ball says you will do very well in "
<< subject << " this term." << endl;
cout << "Good luck!" << endl;
system ("pause"); //needed in bloodshed to pause system
return 0;
}
That is my code, and it runs just fine except for the fact that some times it will cut mid word in the line
cout << "Well, " << name << ", Holly's crystal ball says you will do very well in "
<< subject << " this term." << endl;
Any help would be appreciated.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe that Tools->Editor options (or something like that - I no longer use Dev-C++ or have it installed) has an option to enable/disable line wrapping. It is not on by default, so you must presumably have set it. Line wrapping is a really bad idea in a code editor IMO, I cannot think of a good reason to have it, but most IDE's do for some reason.
I see you are breaking ground in AI with this application ;-) Ready for the Turing Test with this one!
Clifford.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please help, I am new to programming, and I am trying to find the answer in my books and on the web but can't seem to find it. I wrote a program
include <iostream>
include <string>
using namespace std;
int main ()
{
string name;
string subject;
}
That is my code, and it runs just fine except for the fact that some times it will cut mid word in the line
cout << "Well, " << name << ", Holly's crystal ball says you will do very well in "
<< subject << " this term." << endl;
Any help would be appreciated.
Thanks
Thanks Clifford, I will check that out.
I believe that Tools->Editor options (or something like that - I no longer use Dev-C++ or have it installed) has an option to enable/disable line wrapping. It is not on by default, so you must presumably have set it. Line wrapping is a really bad idea in a code editor IMO, I cannot think of a good reason to have it, but most IDE's do for some reason.
I see you are breaking ground in AI with this application ;-) Ready for the Turing Test with this one!
Clifford.
Thanks Clifford, I will check that out.
Thanks Clifford, I will check that out.