Search Results

Showing results 1 to 40 of 264
Search took 0.05 seconds.
Search: Posts Made By: VernonDozier
Forum: C++ 1 Day Ago
Replies: 5
Views: 309
Posted By VernonDozier
If you don't get any of the lines that I added as cout statements, that means that they aren't being executed even once, so it's breaking somewhere, and very early.

Whether the code is the problem...
Forum: C++ 3 Days Ago
Replies: 5
Views: 309
Posted By VernonDozier
I formatted the code to make it easier to read and added a few lines - see "Added by VD" in comments. cin.get() pauses so you have time to read. Press the "Enter" key to move on. Delete later. ...
Forum: C++ 9 Days Ago
Replies: 13
Views: 364
Posted By VernonDozier
My advice is to create both classes that I suggested:


class Merchandise
{
string product;
double price;
};

class GroupedMerchandise
Forum: C++ 10 Days Ago
Replies: 6
Views: 302
Posted By VernonDozier
Lines 15 - 24 - This loop is a black hole. Once you get to line 23 the first time, if you get to it, you'll never get out. Well, you'll get out when you go through it MAX_SIZE times, so that's a...
Forum: C++ 12 Days Ago
Replies: 8
Views: 213
Posted By VernonDozier
"Voila! Syntax-highlighting!" isn't part of the code tag. niek_e is just excited by the power of code tags and decided to spread the enthusiasm. Feel free to replace "Voila! Syntax-highlighting!"...
Forum: DaniWeb Community Feedback 13 Days Ago
Replies: 9
Views: 484
Posted By VernonDozier
Just tried to do a cut-and-paste of some C++ code. It renders fine on the forum page, but when you "Toggle Plain Text" to paste it into another document, you get some tags you don't want ('<strong...
Forum: C++ 13 Days Ago
Replies: 14
Views: 381
Posted By VernonDozier
You need to meet more C++ programmers then. Custom namespaces are all over the place, for good reason. I just debugged my own (very short) project. The culprit? I had several functions called...
Forum: C++ 14 Days Ago
Replies: 25
Views: 1,238
Posted By VernonDozier
"Simple", "efficient", "correct", and "not tedious" are different concepts. Your "easiest", most brain-dead method is to make 120 "if" statements, not taking advantage of the results of previous...
Forum: C++ 15 Days Ago
Replies: 25
Views: 1,238
Posted By VernonDozier
Five numbers can be ordered 5! or 120 ways. The no-brainer way of writing this code would thus be writing an if statement with 119 "else if" statements, one for each possible ordering. You should...
Forum: C++ 18 Days Ago
Replies: 3
Views: 256
Posted By VernonDozier
Add this to your Header.cpp file:


List::~List()
{
}


or delete this line in Header.h:
Forum: DaniWeb Community Feedback 19 Days Ago
Replies: 53
Views: 3,080
Posted By VernonDozier
You "had to" respond with vulgar language? Unless Bob has successfully placed a voodoo curse on you, he doesn't have the power to force your fingertips to type a bad word with the keyboard and click...
Forum: DaniWeb Community Feedback 20 Days Ago
Replies: 53
Views: 3,080
Posted By VernonDozier
Then you're a willing participant in all of this, just like Bob is. What are you complaining about? Seems like you're both trying to get under each other's skin, and Bob's been more successful, but...
Forum: DaniWeb Community Feedback 20 Days Ago
Replies: 53
Views: 3,080
Posted By VernonDozier
You can't delete your account, you can't delete your posts, you can't prevent Bob from posting, you can't control Bob's opinion, and you can't control Bob from PMing you. You CAN block Bob so...
Forum: DaniWeb Community Feedback 22 Days Ago
Replies: 16
Views: 1,255
Posted By VernonDozier
Key word here is "knowingly". We're not "knowingly" doing anything wrong. Quite the opposite. We're explicitly FOLLOWING the directions given. There was no "bug" in any of this. These were code...
Forum: Geeks' Lounge 24 Days Ago
Replies: 12
Solved: Is it legal?
Views: 994
Posted By VernonDozier
Why would you start a thread in the Geek's Lounge and then say this? I mean what's the point of starting a thread if you don't want other peoples' opinions?
Forum: DaniWeb Community Feedback 28 Days Ago
Replies: 16
Views: 1,255
Posted By VernonDozier
That's the main problem, I think. I'm not crazy about the syntax-defaulting the way it is now, but since I know about it, I can get around it when I want to. However, the code syntax defaulting has...
Forum: C++ 29 Days Ago
Replies: 17
Views: 457
Posted By VernonDozier
Lines 20, 88. Arrays already are passed by reference. Get rid of the ampersand:


void medic(int & money, int & potionsize[5]);


Delete the ampersand in red above on line 20 and on line 88....
Forum: C++ 33 Days Ago
Replies: 4
Views: 211
Posted By VernonDozier
These lines are not being skipped. The Fahrenheit values are 32 larger than the Celsius values, which suggests that at least part of the equation is working. Comment the lines out and pick a...
Forum: C++ Oct 28th, 2009
Replies: 8
Views: 353
Posted By VernonDozier
Here's what I think you should do. Don't worry for now about why/how the code did what it did (obviously, you can and probably should go over it later and figure out what it does and why for your...
Forum: C++ Oct 25th, 2009
Replies: 11
Views: 561
Posted By VernonDozier
Is this a code parser? I see you are looking for "/*" and "*/", which are comment delimiters. if not, what is the significance of the tests on lines 29 through 33? Since whitespace is a delimiter...
Forum: C++ Oct 25th, 2009
Replies: 10
Views: 590
Posted By VernonDozier
Making an equilateral triangle with asterisks is probably impossible. Isosceles is more doable:


*
***
*****
*******


Look at the shape. What's the pattern? Here's a skeleton:
Forum: DaniWeb Community Feedback Oct 25th, 2009
Replies: 43
Views: 4,981
Posted By VernonDozier
Well, this post is neutral again. Thanks to whoever upvoted me.
Forum: C++ Oct 24th, 2009
Replies: 10
Views: 590
Posted By VernonDozier
Well, what are you trying to accomplish? What shape are you trying to make? Map it out on graph paper, with coordinates. These almost all have nested loops. The outer loop draws the lines. If...
Forum: DaniWeb Community Feedback Oct 24th, 2009
Replies: 43
Views: 4,981
Posted By VernonDozier
I have one from a year and a half ago where someone must have weighed in very recently since up/down has only been available for a month.

http://www.daniweb.com/forums/thread116831.html

I can't...
Forum: C++ Oct 23rd, 2009
Replies: 4
Views: 149
Posted By VernonDozier
// Test #02 new version
// Title : The Question ?
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

int nAnswer;
int nAnswer2;
Forum: C++ Oct 21st, 2009
Replies: 1
Views: 201
Posted By VernonDozier
This isn't a trivial problem. There are quite a few ways to do it. All are a bit advanced for the first day, but hey, this'll expose you to more code. I tried to think of the most elementary way...
Forum: C++ Oct 18th, 2009
Replies: 4
Solved: Encryption
Views: 245
Posted By VernonDozier
I can't analyze the code you attached since it's in a language I don't know. But here's an example of a very simple encoding technique that simply pads to "encrypt" (not really encryption), and...
Forum: C++ Oct 18th, 2009
Replies: 42
Views: 1,788
Posted By VernonDozier
Now you're just messing with people's heads, aren't you? You were just told flat out that that was against the rules, the guy who gave you the code and the guy you PM'd got lectured for even giving...
Forum: C++ Oct 17th, 2009
Replies: 5
Views: 376
Posted By VernonDozier
Well, it's a bit more complicated than that. It has little to do with the filename. Even if it was a short filename, you'd need an ifstream object. The filename is just the starting point. There...
Forum: C++ Oct 17th, 2009
Replies: 18
Views: 453
Posted By VernonDozier
Well, if you've already solved it, it's a moot point, but I was thinking you would display the factorial variable inside the loop and see if it was changing correctly each time through the loop. ...
Forum: C++ Oct 17th, 2009
Replies: 18
Views: 453
Posted By VernonDozier
The factorial variable as you have it does nothing. You can delete that line. I'd actually name your "s" variable "factorial". It's more descriptive. There's no summation involved.
Forum: C++ Oct 17th, 2009
Replies: 5
Views: 376
Posted By VernonDozier
I'm not very clear on how ifstreams work, so I won't attempt to explain what's going on in any kind of detail. infile is a pointer to something (I'm not entirely sure what). When you try to read...
Forum: C++ Oct 17th, 2009
Replies: 18
Views: 453
Posted By VernonDozier
Well, what results do you get? Nothing! How do you know whether anything is right or wrong if you never display anything? Display factorial, run it for a variety of N values, and see what you get.
Forum: C++ Oct 17th, 2009
Replies: 5
Views: 376
Posted By VernonDozier
infile >> value;
while (!infile.eof())
{


outfile << value;
outfile << endl;
infile >> value;
}
Forum: C Oct 14th, 2009
Replies: 3
Views: 291
Posted By VernonDozier
Yeah, that sounds like a bit more than I want to tackle. I'll just give them different names. Thanks to both of you.
Forum: DaniWeb Community Feedback Oct 14th, 2009
Replies: 25
Views: 2,222
Posted By VernonDozier
I think the Member of the Month should have the most rep power.
Forum: DaniWeb Community Feedback Oct 12th, 2009
Replies: 25
Views: 2,222
Posted By VernonDozier
Everyone has way less than before, except for newbies, who appear to have the same. I remember Ancient Dragon starting a thread requesting a way that he could possibly neg rep someone without...
Forum: C++ Oct 10th, 2009
Replies: 6
Views: 483
Posted By VernonDozier
I'm not a Windows programmer, so I can't help debug, but is there anything in the program that requires you to use all of these Windows-specific headers? Will the regular C and C++ standard...
Forum: C++ Oct 10th, 2009
Replies: 3
Views: 255
Posted By VernonDozier
This isn't a code snippet. If possible, please change the thread type to a regular old thread as opposed to a code snippet.

The && operator doesn't work that way. You want something like this:
...
Forum: C++ Oct 10th, 2009
Replies: 6
Solved: Urgent help #2
Views: 384
Posted By VernonDozier
Post has nothing to do with the thread.
Original poster has shown no effort, so you shouldn't be fixing the code from another poster, even if you were posting on the correct thread, which, again,...
Showing results 1 to 40 of 264

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC