No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
14 Posted Topics
How do I compare what is in one array with what is in another array?
I need to create a function that will allow me to print a hash table below is my code. There are 5 files all together: main.cpp, hash.h, hash.cpp, rec.h, rec.cpp. [code] #include <iostream> #include <fstream> #include <sstream> #include <string> #include "Rec.h" #include "Hash.h" using namespace std; int main() { char …
Need a bit of help formatting my output. I'm not even sure that this can be done. The output from the following code looks like this: Here is your output! ******************** rval = 0.954316 tval = 9.03351 p = 0.999997 Two tailed value = 5.716140e-006 Ok is there anyway I …
Here is a link to the actual assignment [url]http://bluehawk.monmouth.edu/~rscherl/Classes/CS503/hw2.pdf[/url]. At this point I am able to build the linked list from a users input string as well as display that list. Here is the code that I have up to this point. I have two classes a Node class and …
[quote]what's the syntax to load a text file using a c++ program... [/quote] Try something like this! [code] #include <fstream> //include this standard template library char filename[16]; //declare a variable string this one is 16 characters long string line; //decalare a string variable cout << "Enter the name of the …
:eek: I have revised my program and am getting a run time heap error. Any ideas on what I need to fix? [code] #include <iostream> #include <assert.h> #include "rectangle.h" using namespace std; CRectangle::CRectangle() { size = 0; pointArray = new CPoint[size]; } CRectangle::CRectangle(CRectangle& R1) { size = R1.getSize(); pointArray = …
What is the difference between a method and an object? Isn't this a method? void Standard::print_results() What denotes an object?? CONFUSED!
Are you using the #ifndef CTRL-X_H #define CTRL-X_H #endif
I'm very new at this but I'm getting some weird error: unexpected end of file while looking for precompiled header directive I don't have much yet but here it is: #ifndef RECTANGLE_H #define RECTANGLE_H #include <iostream> using namespace std; class Rectangle { public: Rectangle(); //constructor ~Rectangle(); //destructor Rectangle(); //copy constructor …
[Quote] I think your problem is that you have a fuction called WINDSPEED and you also have a variable: double WINDSPEED. Yup this code works! [/Quote] [code] #include <iostream> #include <cmath> using namespace std; void ftoc(double farenheit, double& temperature); //Gets input in farenheit, makes conversion to Celsius, displays results. void …
Try something like this! Remember to #include <list> void Standard::get_list() { char filename[16]; char variable; cout << "Please enter a filename: "; cin >> filename; fstream instream(filename); if(instream.fail()) { cout << "Input file opening failed.\n"; exit(1); } while (instream >> variable) list1.push_back (variable); cout << "\nThe contents of your file: …
how do you read in a text file char by char a store in a string?
Ok I wrote this program a while ago and it just counts the line, now I need to modify it to these requirements: Count the total program LOC, the total LOC in each object the program contains, and the number of methods in each object. Produce a single LOC count …
Can you use a sentinal value, like ask the user to enter values and q to quit sort of thing?
The End.
coolmel55