Posts
 
Reputation
Joined
Last Seen
Ranked #39
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
96% Quality Score
Upvotes Received
264
Posts with Upvotes
215
Upvoting Members
137
Downvotes Received
8
Posts with Downvotes
8
Downvoting Members
8
130 Commented Posts
7 Endorsements
Ranked #260
Ranked #73
~620.86K People Reached
About Me

CS Professor

1,362 Posted Topics

Member Avatar for vegaseat

Everybody should believe in something -- I believe I'll have another drink. -- W. C. Fields

Member Avatar for Reverend Jim
15
13K
Member Avatar for Reverend Jim

> (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, …

Member Avatar for Reverend Jim
10
3K
Member Avatar for Duki
Member Avatar for Matthew_36

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( …

Member Avatar for vmanes
0
990
Member Avatar for rodeostar04

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.

Member Avatar for N@sir
0
5K
Member Avatar for robotnixon

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] == …

Member Avatar for Shafayet92
0
5K
Member Avatar for Reverend Jim

Harney Peak in the Black Hills of South Dakota is the highest point in the US east of the Rockies.

Member Avatar for John_smith
10
21K
Member Avatar for xyrena

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.

0
190
Member Avatar for guitarrick

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 (%) …

Member Avatar for Gabby_2
1
2K
Member Avatar for vmanes

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 …

Member Avatar for JamesCherrill
0
563
Member Avatar for Ancient Dragon
Member Avatar for Anshika_1

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 \\

Member Avatar for tinstaafl
0
251
Member Avatar for Jonathan_26

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. …

Member Avatar for vmanes
0
394
Member Avatar for ReneeJA

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 …

Member Avatar for owlowl076
0
1K
Member Avatar for vegaseat

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.

Member Avatar for rockingjohncart
0
334
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
7
5K
Member Avatar for happygeek

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 …

Member Avatar for XP78USER
6
10K
Member Avatar for DemonicGoldfish

[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.

Member Avatar for Guillaume_2
-1
239
Member Avatar for angel6969

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, …

Member Avatar for Ariel_2
0
1K
Member Avatar for justinlake888

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 …

Member Avatar for hermel
0
2K
Member Avatar for abelLazm

Granted. And when the peasants revolt, you find they are really, really revolting. I wish I could become invisible.

Member Avatar for James_40
8
9K
Member Avatar for khakilang

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 …

Member Avatar for Tcll
0
426
Member Avatar for ddanbe
Member Avatar for HoverportMedia
Member Avatar for ddanbe
Member Avatar for mattster
0
766
Member Avatar for blackmiau

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 …

Member Avatar for almostbob
4
1K
Member Avatar for yaldoo

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 …

Member Avatar for yaldoo
0
6K
Member Avatar for Dan_3
Member Avatar for james2day

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 …

Member Avatar for vmanes
0
112
Member Avatar for iAssistant

-5F. A bit brisk. No, really freaking cold! But, it is almost winter in the Black Hills.

Member Avatar for Stuugie
0
4K
Member Avatar for RikTelner

But Santa can still say "HO" when he's talking about toy trains under the tree.

Member Avatar for jwenting
0
233
Member Avatar for kickbass6

wwjj - the problem with referring to (and responding to) old threads is that the answer that once was right may not still be so. Recent changes to the C and C++ standards allow for variables as array size declarators. Depending on the compiler you use (GCC does suppor this), …

Member Avatar for vmanes
0
5K
Member Avatar for rashad fares

You'll need to better define the problem. Do you mean to take in words that define a number, like "two thousand forty five" and convert to digits, 2045? Or to take in a numeric value, like 2045 and display as separate digits, 2 0 4 5? Once you have the …

Member Avatar for Ancient Dragon
0
155
Member Avatar for Rubinder singh

Visual C++ has lots of online help available. Click on an object or reserved word and press F1. You also get many autocompletion hints as you write the code.

Member Avatar for vmanes
0
3K
Member Avatar for jkhippie

In C++ today, the only significant difference between a struct and a class is the default access - struct, all members are public, class, they're private. So you could rename your struct as a class, and then include it as a data member of a larger class. Or leave it …

Member Avatar for jkhippie
0
248
Member Avatar for PulsarScript

The for loop runs four iterations, so count gets incremented by one four times. count goes from 0 to 1 to 2 to 3 to 4, then is displayed. The while condition is still true, so the for loop executes again: 5,6,7,8, display. While condition still true, so for loop …

Member Avatar for PulsarScript
0
199
Member Avatar for Praveen_10

It really helps to have some reasonable indentation to see what's what. Here's the code, formatted better. #include <cstdlib> #include <ctime> #include <iostream> using namespace std; int findSmallestRemainingElement (int array[], int size, int index); void swap (int array[], int first_index, int second_index); void sort (int array[], int size) { for …

Member Avatar for vmanes
0
319
Member Avatar for ايمان_2

We don't do your assignments for you - read the stickies at the top of the forum. Write some code, if you have questions, post the code, be direct in what you're having problems with.

Member Avatar for Ancient Dragon
0
540
Member Avatar for nitish.mohiputlall

As I interpret that code, only the last of the Fib numbers will be in the file. You open it inside the loop, write a number, close the file. The next pass through the loop will open the file, truncate the existing file (that is, delete previous content) and write …

Member Avatar for vmanes
0
206
Member Avatar for Jamie_3

Within the context given, the new character could be placed in at least a 2 element char array, with a null terminator, making it a string. Then concatenate that. That would also require that the target array be made a valid string at declaration. #include <iostream> #include <conio.h> using namespace …

Member Avatar for vmanes
0
779
Member Avatar for dudicus14

You declare a small array in main. The read_file declares and fills a large array. Back in main you pass that small, empty array to the search function. There's nothing for it to search. How about: int main() { employees array[1000]; read_file(array); search(array); return 0; } void read_file( employee array[] …

Member Avatar for vmanes
0
148
Member Avatar for maisara

Would you please visit Vanna White and buy some vowels? You will get better help when you write in a readable manner. Text-speak is not conducive to technical communication. </rant>

Member Avatar for vmanes
0
283
Member Avatar for agrbinoo.albaker

A few obvious things. You need to have the input statements (lines 9,10) repeated at the end of the loop to get the next input from the user (insert after line 33). Don't increment count in the loop, if it is to be your input value. Personally, I'd use a …

Member Avatar for agrbinoo.albaker
0
300
Member Avatar for beastie805

It really helps if you tell us the error message you get, and what line it points to. In your case, it looks to be a very simple fix - you need to include the string library if you want to use the string type. `#include <string>` And strictly speaking, …

Member Avatar for beastie805
0
450
Member Avatar for michelemalta

I just used your code, and with shift of 4, the Caesar array is: efghijklmnopqrstuvwxyzabcd Just what it should be. What are you seeing as a problem?

Member Avatar for vmanes
0
211
Member Avatar for Jake_4
Member Avatar for michelemalta

If you want to shift the values in an array, you have to be careful what you're doing so that you don't lose anything. Simplest approach might be to simply write code that shifts by one. Take item from the end being shifted out, store it. Move the item came …

Member Avatar for nullptr
0
294
Member Avatar for Brittany_1

You could create an array or vector that holds each of the 6 words. Then the random number you generate is used as an index into that array to display the appropriate word. Also, using those three random numbers will allow you to shorten your comparison tests for winning combinations, …

Member Avatar for vmanes
0
574
Member Avatar for help distressed

Tablets have their place for consumption of content, and lightweight (very lightweight) productivity use. But for really doing work, I don't see the desktop or mid-to upper end laptops going away. Tablets don't have the storage, the power, the ergonomics of usage that a full up machine has. The content …

Member Avatar for Ancient Dragon
0
501
Member Avatar for ckide

The End.