No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
Re: Below, your main with corrections and remarks. Personnally I would avoid having the function M called recursively by itself. The called functions don't return a value until m=1 is reached. This could lead to many threads running simultaneously, I think. There are several solutions. A for loop could be used: … | |
Re: I would think that most modern compilers generate flat 32-bit code, don't they?. An int occupies 32 bits of memory. To see that, declare an int array, for example int a[3] and watch &a, &a[1] and &a[2] during debugging. Here is the disassembly of the code generated by the visual … | |
Re: Books and tutorials are of great help. Which ones to advise depend on your programming experience. See thread 1 C++ books here and the section C programming language of amazon.com where excerpts are available. See also [url]http://msdn.microsoft.com/en-us/beginner/cc305129.aspx[/url]. | |
Re: This is due to the processor precision during the computations. With float variables, it is about 7 digits. See [url]http://www.cplusplus.com/doc/tutorial/variables/[/url]. At the processor level, the binary substraction of a constant from a variable is not performed in exactly the same way as the substraction of a variable from another variable. … | |
Re: Programming can be fun; so if you want to do it by yourself, you could use structure arrays and replace each row of your matrix by an instance of a structure. An advantage: the rows can have different lengths. The comments and additions to your program shown below are for … | |
Re: /*There are several possibilities. Here is one.*/ #include <iostream> using namespace std; int main () { double input_x, number; cout << "Insert value: "; cin >> input_x; char choice ; //choice = 'D', 'R', 'd', 'r'; I don't understand the purpose of this instruction choice = 'e'; //Initialize choice so … |
The End.