OK, I changed the pointers, but that still doesn't solve my problem. Unfortunately, I don't know where the other problems are, or why they would cause that problem.
Type: Posts; User: veronicak5678
OK, I changed the pointers, but that still doesn't solve my problem. Unfortunately, I don't know where the other problems are, or why they would cause that problem.
That part's ok. Here's what I did:
#include <string>
#include <fstream>
#include <vector>
#include <iomanip>
I am trying to write a bibliography program that puts the book's info into a vector, then writes it to a file. Can someone tell me why my "biblio" file is blank when I'm done with this program?
...
I am trying to write a "censor" program that will use a "message" file and a "words" file that contains the banned words. It should replace all the banned words with the the first letter followed by...
I changed the vector to get Accounts, and now i have this errors:
no match for 'operator>>' in 'file >> word'
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
How can i input account into the vector?
The read function was part of the assignment. It is supposed to bring the info into memory. I have never used vectors before, and am so confused about passing and displaying them! Here's what I have...
I need to write this code to take customer info until they select to stop, then display all the records. My problem is thta I am only displaying the last record. How do I make it print all the...
Now I'm more ocnfused than ever! I need an object to call the return function, but now when I say something like "Scramble object" as a declaration, I get the error "No matching function call to...
If I have to do one of those, I suppose I would rather pass the filename to the ocnstructor and open it there. How do I do that?
Ok, so how do I go about that? What would that parameter be? And why couldn't I just open the file in the constructor rather than passing it from main and then opening it?
I know this probably sounds stupid, but how do I pass the filename to the constructor? I can't seem to find any examples! And why do I need 2 constructors? Can't I just add parameters to the one I am...
I'm not sure I understand what you mean. I see how it would work if I named them, but how can I do that? Here's what i have been doing:
#include <iostream>
#include <iomanip>
#include...
Thanks for your help, but I still dont know how to make the generic input/output member functions and retain all the info for later display. And do I call the member functions just like a normal...
Sorry, I realized this was the wrong board the second I posted. Apparently, I can't delete or move?
I wrote this program :
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <fstream>
using namespace std;
When I try "Scramble scramble("dictionary.txt");"
I get these errors :
no matching function for call to `Scramble::Scramble(const char[15])'
candidates are: Scramble::Scramble(const...
Thanks for all the answers, but I need a little more help witht the actual syntax. If I try Brad's suggestion and move that piece of code, how do I keep the program flowing? Do I call the constructor...
I am trying to figure out how to modify this program so the file is read from the constructor:
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
using namespace...
We don't need to use all the functions, but nonetheless, I'm not even sure where to start.
I have fixed more of the first program, and it is passable. I am more concerned with the second part, since I have never even heard of classes before and am having trouble understanding the concept...
I think I have this part figured out now. i thought this would be the easy part! Here's what i got:
#include <cstring>
#include <cstdlib>
#include <iomanip>
#include <fstream>
#include...
I am trying to make a program that takes a scrambled word and checks it against a list of possible words. I am having trouble wusing the strlen function. Here's my code:
#include <cstring>...
I can't believe how bad my teacher is...
Thanks for explaining everything to me. Not only does he not tell us anything like this, he insists we use a combination of C and C++ in every program. Not...
what do you mean, wrong? this is exactly the way i was told to do it, and the way it is in my book.