Type: Posts; User: 2kaud
Search took 0.08 seconds.
Yes. My bad. :o It was originally new int and I changed it to double int. Doh!!!!!
Agreed, but the OP gave no hint of knowing about vectors.
Please use code tags when posting code as you did in your post #1.
What has testing movie.MPAC for 0 got to do with collision? movie.MPAC is the MPAC of the movie read from the file and won't be...
Ok. I've got your program compiled and running. From where does your output get displayed - and why do you think its wrong that casablanca displays at the end of the output? Work through the various...
What trouble, how is it nor working properly - is this compile error or run-time issue? What is the error message or change from expected output?
What debugging of the program have you done?...
amountSpent = atoi(lines.c_str());
should use atof() here as amountSpent is of type double.
I've tidied up the code a bit and added a search on users for surname which displays the details...
See http://www.tutorialspoint.com/cplusplus/cpp_dynamic_memory.htm where the code in the OP post #1 is shown.
An 'easier' way in c++11 would be
auto pvalue = new double;
For what? How far have you got with your coding as per your top level design as per your post #4?
April 21st, 2014, 02:04 PM
If you are giving the users a choice of how many resistors, you might want to consider different numbers for series and parallel. There are several of ways of doing this. One is to ask for the user...
April 21st, 2014, 12:36 PM
double** pvalue = NULL; // Pointer initialized with null
pvalue = new double ; // Allocate memory for a 3x4 array
This is a c++11 way of allocating memory for multi-dimension arrays. As you...
April 21st, 2014, 10:10 AM
Your menu selection code can be simplied. Try this
April 21st, 2014, 09:47 AM
The formula for parallel resistance is 1/RT = 1/r1 + 1/r2 + 1/r3 + ... So if a value entered is 0, just don't add in its reciprical for the parallel sum.
for (int j = 0; j < maxResRP; j++)
April 21st, 2014, 08:36 AM
That's fine (use Help/About for more specific info). The debugger is specific to the compiler. There's Visual Studio xxx, gcc etc for different compilers.
April 21st, 2014, 06:22 AM
As far as I can see, whether m and n are the lengths of the lists up to the intersection point or the full lengths doesn't really matter for at least one of the possible solutions - unless I'm...
April 21st, 2014, 06:14 AM
I suspect that PUBLIC_DECL is a definition defined elsewhere (in a header file?) and could possibly be
depending upon whether the class is being...
April 21st, 2014, 06:08 AM
Use the debugger to trace through the program to see the order of execution then you'll see which comes first. The ability to use the debugger is an essential skill that a programmer needs to master...
April 20th, 2014, 07:20 AM
It's probably an exercise as there seems to be several internet solutions available from a simple google search.
April 19th, 2014, 11:28 AM
If you want to add sorting and searching then I would suggest that you read the whole file into a container such as a vector (http://www.cplusplus.com/reference/vector/vector/) and use STL to do the...
April 19th, 2014, 07:41 AM
and your c++ question is? If you are asking about algorithms regarding statistial distribution, you might get more replies if you posted to the algorithm forum...
April 19th, 2014, 06:51 AM
This will only read sizeof(listed) bytes from the file which is not what you want. The size of the class is different from the size of...
April 18th, 2014, 04:11 AM
You can replace the for loop with memcpy(). See http://msdn.microsoft.com/en-us/library/dswaw1wk.aspx
April 17th, 2014, 10:29 AM
You might find this of interest re waitable timers
together with its links.
April 17th, 2014, 08:51 AM
As the rest of the project seems to be in c++, why not rewrite the perl script in c++?
April 17th, 2014, 07:46 AM
Another way of doing this is to generate all the permutations of the number and then return the one after. One way of doing this in c++ is
April 16th, 2014, 04:17 PM
The problem is that RI_KEY_MAKE is defined to be 0 so could be taken to be this whatever the value of Flags. One way to test for up/down is
Face_right = !(raw->data.keyboard.Flags & RI_KEY_BREAK...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.