I know that. My question is how do I capture the input that I put in when I run the program? How do I get the input into the csis.dat file?
Type: Posts; User: BKurosawa
I know that. My question is how do I capture the input that I put in when I run the program? How do I get the input into the csis.dat file?
For my program I used csis statements like
cout<< "Hello" << endl;
csis<< "Hello" << endl;
I changed my code (see below) and there are still problems. Namely, It completely skips over the input for the author and the performer. For example, say I put in B for book then the next output is:...
I didn't actually put a real author name when I was inputting the authors name... I used random letters.
>> another bug is that if you don't type B or R, you'll have an uninitialized pointer in the...
In addition, I found the program also works perfectly if I do not have any spaces in any of my words. The problem arises when I try to do spaces. How do I fix this?
I just noticed something. My program runs perfectly if I only put in one letter for each input. What does this mean and how do I fix it?
Do you think the reason I am having these problems is because I am using char? How would I use std::string instead?
Hi, I have make an abstract base class called Holding and I have to make two derived classes that use some virtual functions. I have already made these classes but on top of all this I have to make a...
How do I call the base class constructor directly?
I have a derived class called CaseString that is supposed to capitalize and decapitalize the characters of a string. What is wrong with the code?
//case.h
#ifndef CaseString_H
#define...
>> The order in which you do things is a bit wrong.
How so?
What if I do this? :
ReverseString ReverseString::operator ~()
{
int k = 0;
char *temp = buf;
for(int i = stringlength-1; i>=(stringlength/2); i--)
The temp points to buf... why is that a problem?
I have the test up there. I might be wrong but I think that the output should be:
Purusha
ahsuruP
Purusha
How do I fix it? Thanks
I mean is there anything wrong with the code? Because the program crashes when I run it. When I debug it breaks it opens up a new set of code in the ostream library and it points to this:
...
Do you know how I can fix my class? Thanks
I posted the function (~operator) but I'll post the entire header and source code:
//reverse.h
#ifndef ReverseString_H
#define ReverseString_H
For my driver I have to reverse the strings in a string literal by means of a class called ReverseString. I will show you guys my function below that is supposed to reverse my string. I will also...
Don't the variables initialize if I write:
class CaseString: public String
the size and stringlength variables seem to work correctly when I look at their values in the debugger.
Hi, what is wrong with my derived class called CaseString. The purpose of the class is to convert all the characters in a string object to both uppercase and lowercase without modifying the original...
what is wrong with this code?
ReverseString ReverseString::operator ~()
{
int k = 0;
char *temp = new char[size];
for(int i = stringlength-1; i>=(stringlength/2); i--)
You are right temp= buf; should not be there. No I did not define conversion of char* to ReverseString.
I still don't have it. What is wrong with this? Thanks for the help BTW.
ReverseString ReverseString::operator ~()
{
int k = 0;
char *temp = new char[size];
temp = buf;
I changed the code and it is still doing the same thing
ReverseString ReverseString::operator ~()
{
int k = 0;
char *temp = buf;
for(int i = stringlength; i>=(i/2); i--)