Type: Posts; User: jefranki
Search took 0.02 seconds.
October 28th, 2009, 04:07 PM
All the variables are already ints so using the floor() function is redundant. You also might want to look into putting some error guards in against invalid dates like February 29 in a non-leap year,...
September 11th, 2009, 12:44 AM
And let's also not forget the simple, "Whoops! I forgot to allocate enough memory to my application and now it's paging to the hard drive constantly."
September 11th, 2009, 12:34 AM
If you are programming something especially processor intensive, you might notice a difference based on CPU Architecture (PowerPC vs. Intel vs. MIPS, 32-bit vs. 64-bit, etc) even if they are all...
September 3rd, 2009, 03:26 PM
From what you posted earlier: Binary binarys; This means you defined binarys as an array of Binary objects.
Where you may be getting confused when the technical detail gets mentioned that...
September 2nd, 2009, 03:45 PM
I'm not sure it will get rid of your problems, but I noticed some design issues:
1. You have using namespace in your header files. This should only be in your .cpp files. This can cause a myriad...
September 1st, 2009, 07:01 PM
My gut feeling is that you are misusing the * operator, but I can't say for sure without more information.
We can likely help you if you post how binarys and binaryid are defined (your actual...
September 1st, 2009, 03:56 PM
You say these are IDs?
Will you be performing any math on these? Is there a requirement for your numbers ever to be output as base-10?
If your answer is "no" to both, your solution is alot...
August 27th, 2009, 12:25 PM
If you are still using "hunt and peck" or constantly stare at the keyboard while typing, it would we a good idea to take a typing class, or get some software for the same purpose.
Other than that,...
August 13th, 2009, 04:23 PM
As of your last posting, there are several things wrong.
First of all, you are mis-using the extern keyword. extern does not define a variable, it only lets you re-use a global declared in some...
August 10th, 2009, 04:04 PM
andrey_zh was just quoting Google's in-house coding standards, which are about good coding practices (especially in a large team / multiple-programmer setting), not about what the language does or...
July 27th, 2009, 05:53 PM
It's not generally a good idea to test floating point numbers for primality because of round off error. To illustrate:
In a 32-bit floating point number, the maximum value you can exactly convert...
June 25th, 2009, 03:31 PM
After perusing that .c file, the comments especially, I get the impression that they are using a sphere-proper for generating the z-coordinate when the (x,y) is close to the center of the sphere, but...
Here's a couple quick examples to illustrate some differences between C++ and Java that might help you with your initial questions. I'll use Java classes, and C++ structs for the examples, for...
Do all your header files have guards around them? By guard, I mean something like:
// all the usual header file stuff should go in here
// between the...
I'm guessing you have large program that is always doing something, and has a main loop that only breaks on some particular user input?
I'd suggest just look into the data structures and functions...
First of all, you are completely misusing switch-case.
Example of how it should be used:
//do Something #1
April 28th, 2009, 03:39 PM
If you need to get your head around this stuff, just make up some simple problems and work them by hand in -fraction- form.
i.e. 7 divided by 2 == 7/2 (improper fraction) == 3 1/2 (mixed number)...
April 27th, 2009, 01:36 PM
You need nested loops here.
Set your result initially to your n. Then have an outer loop using while(result/10 > 0). The inner loop should do the brunt of the math using % and / starting with the...
April 27th, 2009, 01:00 PM
As supplied, this code is equivilent to:
using namespace std;
int i, j;
April 24th, 2009, 06:56 PM
I noticed that you have using namespace std; in your header files, that can cause problems as well. using namespace whatever; should only be in your implementation files.
Similarly, you have...
April 17th, 2009, 05:50 PM
Do your loops so you iterate by row and by die number, with an array holding the roll values. Make a function that will draw a given row (but not every row) for a given roll value.
Maybe this code...
April 17th, 2009, 01:58 PM
Whether you should multi-thread or not would depend on the hardware you are targeting.
If you are targeting a single-core, non-hyperthreaded processor, you are going to take an extra CPU hit...
April 13th, 2009, 07:08 PM
anything%0; //divide by zero error
March 26th, 2009, 01:59 PM
I opened the editor before your post came up. At any rate, I missed the prefix vs. postfix element.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!