- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 264
- Posts with Upvotes
- 215
- Upvoting Members
- 137
- Downvotes Received
- 8
- Posts with Downvotes
- 8
- Downvoting Members
- 8
CS Professor
Re: Everybody should believe in something -- I believe I'll have another drink. -- W. C. Fields | |
Re: > (I am waiting for the resident gun nut to make an appearance and bring up the 2nd amendment - hehehe). I'm not going to go political and 2A here, but the gun handling on most every TV show or movie is horrible. The way people repeatedly pump the shotgun, … | |
Re: A Kinder Surprise (aka Kinder Egg aka Kinder Ei) | |
Re: OP - I don't see a problem with your code. I would hope by now you found it to work. Here's a pared down version of your problem, and it works fine for me. #include <stdio.h> #include <stdlib.h> typedef struct sortedDistance { int num; double distance; } sortedDistance; int compare( … | |
Re: Are variable a, b, c, s all integer types? What is the exact error message? sqrt( ) requires an argument that is a floating point type. Typecasting will be needed if your args are all integer types. | |
Re: Your function seems correct, as the following full example shows. What is in the array you pass to the function, and how are you passing it? [code] #include <iostream> #include <string> using namespace std; void searchString(string A[],int size, string target) { int j; for(j=0; j < size; j++) if(A[j] == … | |
Re: Harney Peak in the Black Hills of South Dakota is the highest point in the US east of the Rockies. | |
Re: First thought is that you should store the responses, and the correct answers, in arrays of type char. That way you could use a loop to compare responses to answers and quickly calculate overall score. | |
Re: The assignment does not seem clear as to how display should look. The count should be private, however, so you can't just display that in the main program. Add a display( ) method that outputs the count in a formatted manner. You can use division and the modulus operator (%) … | |
some problem with your computer just sort of fixes itself, and you don't know what was actually wrong or what made the problem go away? Case in point. On my main XP box, I could not get a proper connection to one of the networked printers in my home. Every … | |
Re: You appear to be defining a function (m2) inside a function (hang). I think it would be better if the function prototypes (lines 6,7,8) appeared before any functions. Oh, and when you make a comment in code, use //, not \\ | |
Re: First, your maxHeight needs to be a member of the class, so move it up. And it needs self as a parameter, like: def getX(self): "Returns the x position (distance) of this projectile." return self.xpos def maxHeight(self): time=self.yvel/9.8 self.maxheight=self.ypos+time*(self.yvel/2.0) return self.maxheight Then your problem with str( ) needs two fixes. … | |
Re: You should make an attempt to solve the problem first. Then, point out what's giving you difficulty, and we will try to help you find the solution. For your problem, start by writing out the steps you would take to do this by hand. What input do you need, what … | |
Re: My last three vehicles have been red. Just plain red. Going back to 1986. I don't know why, it's just worked out that the vehicle I needed/wanted to buy happened to be there, in red. | |
Re: There's your problem, reading a news article. With all the downsizing, proofreaders were the first to go. My grammar gripe lately is the improper use of apostrophes - people want to put them everywhere, needed or not. Most egregious misuse is in plurals. I see it so often, it's inadvertantly … | |
Re: I have a large format printer for which there was never a good XP driver - so I keep a Win98 machine. My main color printer doesn't always work quite right with some software under Win7, so I will keep an XP machine or two running. I may block them … | |
Re: [QUOTE=The Dude;520131]I wonder if putting them back on an ANALOG platform would also restore the FULL QUALITY of an analog stream.. (Records,etc)[/QUOTE] You can never go backwards. Lost data is lost. | |
Re: For starters, your input function can't make up its mind what it's supposed to do. [code] void fillArray(char a[], int size, int& numberUsed) { cout << "Enter up to " << size << " letters or characters.\n" << "Mark the end of the list with a negative number.\n"; int next, … | |
Re: Justin - what are lines 21-33 supposed to be doing? If you're trying to separate the units and the tens, you're over complicating the process. ArkM- your approach is fine, for a small number of numbers. What about the twenties, thirties....? Handle the special case of the teens Then do … | |
Re: Granted. And when the peasants revolt, you find they are really, really revolting. I wish I could become invisible. | |
Re: I expect to keep on using XP on a couple boxes pretty much forever, or until they die, whichever comes first. If I get worried about security, I'll block them from internet access. Right along with the Win98 box I keep. Have a couple pieces of hardware that wouldn't run … | |
Re: I find "scroom" to be quite useful these days. | |
Re: My first personally owned computer was also a Timex-Sinclair 1000 - with about all the add-ons I could add on. At the same time I was using Wang PCs at work and original IBM PCs (with both monochorme and color monitors attached) at the college. The mainframe lab had just … | |
Re: You appear to have most of it solved, just some little details to figure out. `while(inputFile.eof() && inputFile2.eof())` Assuming both files opened successfully, this line will keep any useful work from ever happening. eof( ) returns false every time until the end of file has actually been reached (attempt to … | |
Re: We need to see you do some work first. Or ask specific question on some topic or technique. We don't do your homework for you. OK, here's a start for you. Ask the user for number of scores. Declare a pointer to the type of data you're using. Allocate an … | |
Re: -5F. A bit brisk. No, really freaking cold! But, it is almost winter in the Black Hills. |