Forum: JavaScript / DHTML / AJAX May 19th, 2009 |
| Replies: 1 Views: 557 The position and visibility of the image element is dynamically updated.
The following code displays the correct dimensions in Firefox 3.0.10 and Chrome 1.0.154.65, but displays "0,0" in IE8.
... |
Forum: C++ Jan 19th, 2009 |
| Replies: 5 Views: 385 I think you need to set resident[i-1]->next in here somewhere. |
Forum: C++ Dec 30th, 2008 |
| Replies: 8 Views: 737 Ah, ok, I get it now. Thank you for all of your help! |
Forum: C++ Dec 29th, 2008 |
| Replies: 12 Views: 1,153 |
Forum: C++ Dec 29th, 2008 |
| Replies: 8 Views: 737 Thanks, this is much more honest, direct, informative and helpful than "It's cool!"
OK, now I see what you mean.
I understand eliminating the using std::string but I don't understand... |
Forum: C++ Dec 27th, 2008 |
| Replies: 8 Views: 737 Thanks, this is exactly the type of feedback I'm looking for.
Really? Is this one of your defects? If so, why?
I suppose I took the lazy way out. I got as far as thinking I could make... |
Forum: C++ Dec 27th, 2008 |
| Replies: 8 Views: 737 Thank you. Yes, a non-generic name member was my intent for this excercise. I wanted to start with something simple before I tackle a larger project. One thing I overlooked was error handling. Not... |
Forum: C++ Dec 27th, 2008 |
| Replies: 8 Views: 737 Hi all. I wanted to run this class by some experienced programmers to see if I have any obvious errors and to get any advice otherwise.
I created a test suite and everything seems to function... |
Forum: C++ Jul 14th, 2008 |
| Replies: 13 Views: 1,292 My favoritest book has been C++ : how to program / H.M. Deitel, P.J. Deitel. |
Forum: C++ Apr 27th, 2008 |
| Replies: 9 Views: 3,339 Thanks for the info. That is unfortunate, but the Linux (note spelling, you had a typo) OS I am using is free, so I can't complain too much about it. And like I said, it is adequate for what I am... |
Forum: C++ Apr 27th, 2008 |
| Replies: 9 Views: 3,339 Yeah, I finally opened my eyes and stopped being lazy about it. I ran this exact code: (;) Dave...):
#include <ctime>
using std::clock;
#include <iostream>
using std::cout;
int main()
{... |
Forum: C++ Apr 26th, 2008 |
| Replies: 9 Views: 3,339 Thanks. I thought of that, so I ran something like:
...
clock_t b,e
int a
b = clock();
cout << clock() << '\n';
cin a;
cout << clock() << '\n';
e = clock(); |
Forum: C++ Apr 24th, 2008 |
| Replies: 15 Views: 1,609 I came up with these helper functions to convert a name to a number. Even with different capitalization, the same name will be the same number each time. You can then add these numbers together and... |
Forum: C++ Apr 24th, 2008 |
| Replies: 9 Views: 3,339 Running 64-bit Fedora 8 on HP laptop with AMD Turion 64bit/dual core, developing in Eclipse, compiling with g++. The clock(); function always returns 0. Any ideas why this is so? I have had no... |
Forum: C++ Apr 14th, 2008 |
| Replies: 8 Views: 731 Also, in your if block, all you really need to do in there is output your line and in either case you set index=0;, so you don't need the else... you can just set it outside the if block. Along with... |
Forum: C++ Apr 14th, 2008 |
| Replies: 8 Views: 731 What happens if you just remove the (index>0) from your test? |
Forum: C++ Apr 14th, 2008 |
| Replies: 8 Views: 731 Ok, starting to look through it... first thing i see is that you keep inputing strings into the variable "text" until the end of the file, so text will only have the last string in the file. Then you... |
Forum: C++ Apr 14th, 2008 |
| Replies: 8 Views: 731 Still haven't looked through the code but you might need to add some parens around all of your symbol tests (all the tests that are ||. |
Forum: C++ Apr 14th, 2008 |
| Replies: 8 Views: 731 For your utility to create the text files, I think you're excluding 'z', you might have to expand your rand() function a little. You don't need to bother with the stack in your file creation utility... |
Forum: C++ Apr 14th, 2008 |
| Replies: 10 Views: 2,252 I also noticed your pali function is defined to return a char, but you are really returning an int.
You may be too commited to this approach, but as an alternative, you could eliminate the need to... |
Forum: C++ Apr 14th, 2008 |
| Replies: 10 Views: 2,252 Take a look at this statement, what is it doing and what do you want it to do?
s[b]=test[c];. Also, what is the value of b the first time through the loop? |
Forum: C++ Apr 13th, 2008 |
| Replies: 4 Views: 524 I wouldn't include the remainder variable in main. You don't need to pass it into your function. I would make remainder an int and assign it in your div function. Instead of just calling your... |
Forum: C++ Apr 13th, 2008 |
| Replies: 2 Views: 623 you'll have to keep track of how many items are in the array, will be 0 when empty. Will add one when you Insert and subtract one when you Remove or Erase. Plus you already created the empty array... |
Forum: C++ Apr 13th, 2008 |
| Replies: 4 Views: 524 This looks like the formula for a recursive procedure, which is a procedure that calls itself. You have to be careful with recursive procedures because you risk going into an endless (until you run... |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 that looks right... and if that successfully weeds out the invalid index values , then you can eliminate the if statement altogether and just do your cout. |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 sorry, missed your last couple, you figured out the size-1 part, now look at the rest. |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 Congratulations, but not quite there (really, really close though). You have the do--while in the right place, but the test is incomplete. What if someone enters -5? Also, what if the array size... |
Forum: C++ Apr 13th, 2008 |
| Replies: 42 Views: 4,862 Check your curly braces {}... if you have more than one line of code to run within an if or else, the code must be enclosed in {}. It is good practice to always use these, even if you have a single... |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 Good work! So now you 1) ask for input 2) if the input is in the desired range, output (otherwise do nothing). What you want to do is ask for input while input is not in the desired range, then... |
Forum: C++ Apr 13th, 2008 |
| Replies: 22 Views: 1,526 The way it is now, you effectively set j=0, then test if( 0 <= j && j < size ), which will always be true, since j will always be 0 at this point. You didn't need to add a new variable(j), you... |
Forum: C++ Apr 13th, 2008 |
| Replies: 10 Views: 916 |
Forum: C++ Apr 13th, 2008 |
| Replies: 4 Views: 4,026 Do you use input somewhere else in the top part of your code, like to display what value was converted? If so, then you should leave it as a parameter to your conversion functions. Also looks like... |
Forum: C++ Apr 12th, 2008 |
| Replies: 5 Views: 514 To answer your question... it is not working because (in your current design) when you say cin>> *sName; it is the same as saying cin>> sName[0];. The effect is overwriting the first person in the... |