Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
72% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
0 Endorsements
Ranked #1K
~8K People Reached
Favorite Tags

16 Posted Topics

Member Avatar for tymk

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. [code] var _img = document.getElementById("imageElementId"); alert(_img.width + ", " + _img.height); [/code] Any ideas on how to get it to work …

Member Avatar for essential
0
85
Member Avatar for SUD
Member Avatar for JAGgededgeOB172

[QUOTE=JAGgededgeOB172;782629] [code] while(!inFile.eof() && i <= max) { getline(inFile, resident[i]->name); getline(inFile, mySSN); resident[i]->SSN = atol(mySSN.c_str()); getline(inFile, myage); resident[i]->age = atoi(myage.c_str()); getline(inFile, resident[i]->address); getline(inFile, skip); i++; } [/code][/QUOTE] I think you need to set resident[i-1]->next in here somewhere.

Member Avatar for JAGgededgeOB172
0
119
Member Avatar for tymk

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 properly so I'm interested in feedback on overall class design, choice of data types, …

Member Avatar for tymk
0
132
Member Avatar for fmwyso

My favoritest book has been C++ : how to program / H.M. Deitel, P.J. Deitel.

Member Avatar for Dave Sinkula
0
146
Member Avatar for gazoo

Check your curly braces {}... if you have more than one line of code to run within an [icode]if[/icode] or [icode]else[/icode], the code must be enclosed in [icode]{}[/icode]. It is good practice to always use these, even if you have a single line of code to run.

Member Avatar for tesuji
0
895
Member Avatar for tymk

Running 64-bit Fedora 8 on HP laptop with AMD Turion 64bit/dual core, developing in Eclipse, compiling with g++. The [icode]clock();[/icode] function always returns 0. Any ideas why this is so? I have had no problems using the rest of the [icode]ctime[/icode] library. [code=cpp] #include <ctime> using std::clock; #include <iostream> using …

Member Avatar for Salem
0
5K
Member Avatar for Black Magic

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 use the result to seed the random number generator or use the numbers in …

Member Avatar for Black Magic
0
158
Member Avatar for Lensva

For your utility to create the text files, I think you're excluding 'z', you might have to expand your [icode]rand()[/icode] function a little. You don't need to bother with the stack in your file creation utility either, since you pop immediately after pushing, you can save 2 steps and just …

Member Avatar for Lensva
0
208
Member Avatar for Sky Diploma

Take a look at this statement, what is it doing and what do you want it to do? [icode]s[b]=test[c];[/icode]. Also, what is the value of [icode]b[/icode] the first time through the loop?

Member Avatar for Sky Diploma
0
164
Member Avatar for mikky05v

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 out of memory) loop -- unless you make sure you have an exit condition -- your …

Member Avatar for tymk
0
92
Member Avatar for Black Magic
Member Avatar for lianaconda

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 when declaring it under the private section.

Member Avatar for lianaconda
0
145
Member Avatar for Moporho

The way it is now, you effectively set [icode]j=0[/icode], then test [icode]if( 0 <= j && j < size )[/icode], 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 should just not alter the user input …

Member Avatar for Moporho
0
153
Member Avatar for Drezta

Do you use [icode]input[/icode] 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 you call [icode]p2e()[/icode] in both cases, should probably be calling [icode]e2p()[/icode] when [icode]choise …

Member Avatar for Drezta
0
196
Member Avatar for Lensva

To answer your question... it is not working because (in your current design) when you say [icode]cin>> *sName;[/icode] it is the same as saying [icode]cin>> sName[0];[/icode]. The effect is overwriting the first person in the list each time you call [icode]newItem();[/icode] The quick fix for that problem in your current …

Member Avatar for Lensva
0
109