Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
65% Quality Score
Upvotes Received
7
Posts with Upvotes
7
Upvoting Members
5
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
3
2 Commented Posts
~20.8K People Reached
Favorite Forums
Favorite Tags

22 Posted Topics

Member Avatar for gnarlyskim

Next project in my C++ course is to create a class Polynomial to add, subtract, multiply by a scalar, and multiply by another polynomial. I've written my code, and it works fine when I run it, but there's an application that is provided by our instructor to compare my .exe …

Member Avatar for Calista Flock
0
2K
Member Avatar for gnarlyskim

Having issues with this program. I've been trying to identify all the areas where data is created, then tried to destroy it likewise after using it. I've put a lot of delete[] coef (coef is a pointer double array to hold coefficients). The program will run half the time, then …

Member Avatar for gnarlyskim
0
130
Member Avatar for gnarlyskim

I'm working (well have been for the past few weeks) on a polynomial class to do different things between two polynomials: multiply, divide, get remainder, subtract, add. The coefficients are stored in a pointer to an array listed under private and the degree (also the amount of slots in the …

Member Avatar for gnarlyskim
0
88
Member Avatar for wittykitty

[CODE]Term[COLOR="Red"]&[/COLOR] Term::operator +=(const Term &t)[/CODE] Added the reference. Not positive because I don't know what the class Term consists of, but I don't think you can use cin with an object of a class. I am not completely sure of this, so it's worth looking into. Just throwing some suggestions …

Member Avatar for wittykitty
0
116
Member Avatar for allaboutdrew

What they said^^. Here's one way, may not be the best: Just looking at what you need to accomplish, you can use two "for" loops. Set a double (say maxRain) equal to the first number in the array, then use the first for loop to cycle through and compare the …

Member Avatar for gnarlyskim
0
124
Member Avatar for miskeen

create a pointer to the array then use "object pointed to"=new "type"[size] ex: [CODE] double* array; array=new double[69]; [/CODE] Or if you really want to get crazy, you can have the user input the size, but make sure to remember data is stored in the 0th spot of an array …

Member Avatar for miskeen
0
15K
Member Avatar for aroma7

I'll give an example of what I've been working on for my C++ class: consider a program to process polynomials (add, subtract, multiply etc). I created a class called Polynomial. From within this class, I had private variables of an array to hold the coefficients of a polynomial, as well …

Member Avatar for gnarlyskim
-2
101
Member Avatar for sana zafar

Make sure to enclose all C++ code within the code tags. [url]http://www.daniweb.com/forums/announcement8-3.html[/url] Look up ifsteam and ofstream. You'll need the <fstream> header as well. This is the method you might want to use for opening a file to read (ifstream) and outputting your data (ofstream). One method of doing so …

Member Avatar for gnarlyskim
0
124
Member Avatar for gnarlyskim

I'm trying to clean up my coding a bit for a program I'm working on. Here's an example of my code (not my exact code, but I've adapted it to an example): [CODE]class Example { private: double* group; int number; public: Example() {group=new double[1]; number=0;}; Example(const Example& ex); Example& Example::operator=(const …

Member Avatar for gnarlyskim
0
127
Member Avatar for gnarlyskim

Say I have an array: array={1, 2, 3} but I want to be able to increase the size, and shift the data to the front, leaving 0's behind. So i want the array to turn into this: array={1, 2, 3, 0, 0} Where I added two to the size of …

Member Avatar for gnarlyskim
0
148
Member Avatar for gnarlyskim

I'm working on a project for my first use of classes and OOP. I've read all our slides (only provided examples though) and two tutorials on classes, but I confused about a few things. I'll show first the assignment then I'll post my specific questions after. [QUOTE]You will need to …

Member Avatar for gnarlyskim
0
140
Member Avatar for gnarlyskim

I'm looking for a few suggestions on different ways to input a polynomial into an array (coef[]) using a degree (double degree). I have one way that works, but my most recent project needs a new way to do the same thing (not sure why but it can't hurt to …

Member Avatar for venkat arun
0
103
Member Avatar for marshella

[QUOTE=marshella;1145637]how to write a program in c++ for this type of question? Write a calculator program in c++ that allows the user to select which operation they would like to perform such as: Addition, subtraction, multiplication, division, modulus, Square, Square root, Convert Celsius to Fahrenheit (Fahrenheit = 1.8 Celsius +32), …

Member Avatar for nats01282
-1
321
Member Avatar for Mridula J

[URL="http://www.computer-books.us/cpp_8.php"]free bookz---exception handling inclusive[/URL]

Member Avatar for gnarlyskim
0
71
Member Avatar for gnarlyskim

I have to be able to read text from a file then manipulate it to find the average value of an integral over a given bounds [a,b] from an input file, then export it to another file. I do not know how to store the information to process it. Say …

Member Avatar for gnarlyskim
1
184
Member Avatar for Robyy14
Member Avatar for dusktreader
0
147
Member Avatar for gnarlyskim

So I've missed the past week of my C++ class due to the SEC swimming championships being a week long :@, and I've missed the whole topic on file processing. I've been reading the slides and a few tutorials via lovely google searching, but it's a little hazy. Can anyone …

Member Avatar for gnarlyskim
0
146
Member Avatar for gnarlyskim

trying to do input checking for an alpha character inputted where a numeric one is needed. I've implemented this function firstChoice() to allow a certain response is '2' or '3' was picked and then another certain response for anything other than '0 '1' '2' or '3'. I must add another …

Member Avatar for gnarlyskim
0
442
Member Avatar for AmigaCarolena

in your cin statements, use your declared variables (ex. year, make, model) for what you want to be inputted. When you run the program, the type you enter for each question will be stored as each value (careful that you don't try to store 'Bronco' as an int value). When …

Member Avatar for gnarlyskim
0
336
Member Avatar for gnarlyskim

As you can see I am new here. I found this site from googling a question about a getChoice() function , and I was able to learn how to implement the function in my project to fit my needs from the post. ([url]http://www.daniweb.com/forums/thread162456.html[/url]). Well anyways, I have more issues that …

Member Avatar for gnarlyskim
0
1K
Member Avatar for MrYrm
Re: Oi

Hey YRM, nice to meet you. I too am learning C++ currently, I think this community has a lot to offer for us!

Member Avatar for ArtphotoasiA
0
88
Member Avatar for gnarlyskim

I was lucky enough to find Daniweb via google on searching for explanation on a getChoice() function for C++. I'm excited to be a member of the community. I can see that there is a lot to learn on these forums, as well as some people extremely qualified to help …

0
40

The End.