User Profile
Collapse
-
What is H in your function? Is it possible you want J<H? if you're writing too far on your array you might be corrupting the memory surrounding it. One way to check the fprintf is to test it with a plain printf. It could be your formatting but that looks ok. -
Run your code through a good debugger and find out where the value is getting scrambled. Did you leave in one of the ampersands when you call your function in main? If you're not comfortable with the debugger pepper your code with cout statements to trace it. I can't begin to know where that value comes from but it's most likely an address or possibly due to an overflow.Leave a comment:
-
Code:ToTaling(&TotalRate,&TotalRegHours,&TotalOvtHours, &TotalGrossPay, &TotalFedTax,&TotalStateTax,&TotalSSITax,&TotalDef erred, &TotalNet);
I know they're boring but reread...Leave a comment:
-
C99 allows that type of declaration:
http://bytes.com/topic/c/answers/698...claration-loop
it depends on with what standard of C you are looking to comply....Leave a comment:
-
Apologies I didn't understand that C# was an absolute necessity. I double checked and it looks like ngspice is pure C. I did find this which looks like people are trying to port it (or at least make wrapper classes for it):
http://naif.jpl.nasa.gov/pipermail/s...ry/000267.html
It may cost, though. It looks like they are talking about using ngspice as a DLL called from C#...Leave a comment:
-
Open source and I think it's along the lines (thought I'm not totally clear on your requirements) of what you are looking for:
http://ngspice.sourceforge.net/...Leave a comment:
-
Should be #include <cstdio> I think.
He or she might be asking for cout/cin in place of printf/scanf? But like newb said if you really want to use the original c functions just use them directly in your C++ prog.Leave a comment:
-
Something like this? http://www.aforgenet.com/framework/d...66c7824669.htm
I can't speak to the quality of the algorithm for your situation, as you might have to convert grayscale (I assume you mean this and not pure black and white) to faux colors to get a good comparison. I'm betting that under the hood it's not too much different than the one tlhintoq recommended, however.Leave a comment:
-
T[0] is a pointer since this is a 2-D array . If you want to you could substitute &T[0][0] (see the Arrays Revealed that Don had recommended).
I was commenting before that you have the calculation i+j*MAXROW, but that's not how arrays are laid out in memory, where the column is offset into it's particular row.Leave a comment:
-
in your scanf, your T should be T[0] (so that your pointer is correct). To correct your other mistake, draw your array out on a piece of paper from the point of view of how it is stored in memory.Leave a comment:
-
Change the condition of your while loop to reflect your two input criteria (so say while greater than 1 and less than 10). Take in your value for the number of games and use a second loop outside of the while loop but surrounding your game loop. You'll have a set number of games, so treat it like when you had a set number of guesses.
Also, please use the code tags (highlight your code text and hit the # button on the upper right...Leave a comment:
-
Check this out for the [ ] overloading http://www.learncpp.com/cpp-tutorial...ript-operator/
I don't think you need to additionally overload the assignment operator for this particular case. Once you are accessing any particular element (by using the [ ] with the index) you can then assign to it with = as normal.Leave a comment:
-
JonathanS replied to can comment about this and help to check the error. its related to my previous post.in Cin [(x-1)^2] all over 2, the exponent and the denominator will not cancel (and not for any n).
The value for N is a bit trickier. N is something that either your course instructor will specify or something you decide on based on how close you want your approximation to come to your answer. Think of the series as being "dominated" by the first term (x-1). So the log of 2 is going to be close to 1. The next terms...Leave a comment:
-
That was my bad Randy. Thanks for straightening it out Banfa.Leave a comment:
-
PWServer pws = new PWServer(infile ,outfile,max);
you will need to substitute your appropriate values for infile, outfile, and max depending on how you've defined them.
if(pws.CheckPW( uid,upw) == 1) -or whatever is appropriate
again you'll need to fill in the appropriate values for uid and upw depending on how you defined them. You'll need to put it into some kind of conditional statement to check if the value is 1 or...Leave a comment:
-
What if you instantiate a PWServer using new?
Or I think you could change your PWServer class to make the CheckPW() function "static," but that may not be a good design...Leave a comment:
-
-
Clarification of differences?
So, is this case something that DM is letting go that it shouldn't or an enforcement by gcc that shouldn't be in place?
Also, why the <> after the function name (operator<< in this case)?Leave a comment:
-
Not sure what OP#16 refers to, but I am also wondering why g++ is saying these functions are undefined once I get to main(). Could this be a specific problem with the compiler?
Thanks and happy holidays to all.Leave a comment:
-
Sorry to double post
I've added in the change that boxfish suggested, and I think that I'm still having some problems with the template business overall as compiling under g++ still gives me the following error:
LOCALS~1\Temp/ccGyaaaa.o(.tex t$_ZN6DLink2IiE C1EiPi[DLink2<int>::
DLink2(int, int*)]+0x1b0): In function `ZSt17__verify_ groupingPKcjRKS s':
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/locale_...Leave a comment:
No activity results to display
Show More
Leave a comment: