It means it can hold as many decimal places as you want it to.Can GNU MP library do it?
I still don't understand what they mean by multi-precision...
Seems promising :)It means it can hold as many decimal places as you want it to.
I'm not sure if it would work, it's certainly something I'll look into. This page (linked from the Wikipedia page about GNU MP) also looks promising.
If you mean for the forums or something, you should ask in the Web subforum. If you mean like for an OS, I think that's a bit more complicated, you'd be better off looking for open source projects.Do any of you have a basic code template for a style switcher? I haven't been able to make one for some reason...
Please reply with a VM/PM, though
I would like to learn OpenGL, personally. It seems pretty powerful.Does anyone know OpenGL, DirectX or XNA... or has ever wanted to program games or done that in C++?
ActionScript is the thing with Flash, right? Yup it's worth learning... You can create dynamic applications with Flash and AS is useful for it.
PHP is a different thing, it becomes almost a necessary when considering dynamic web pages... Say when you want to take user input, handle logins etc (PHP is almost like programming combined with web-pages)... It is generally preferred over Flash for the same job (comparability + speed)
Python with CGI and Ruby on rails can do the same jobs as PHP. C++ can do the job but I recommend against it.
I say forget PHP, get a host with Ruby or Python with CGI and learn AS. Ruby on rails is almost exactly like Ruby.
C# is great for quickly making applications, especially GUI ones. It's similar to Java but actually compiles to executable instead of .class and has sane gui-making stuff rather than Swing (which is horrible). Neither is really better, each has its own strengths, like with most programming languages.Okay. Thanks for the answer. I will take your advice.
Last question,
In software development, C++ is still the best to use, right? Although there are many people who use and are now using the .NET framework (C# mainly). I didn't like C# much. I know it resembles C++ with a few added features, but I see it very based on Java (which I hate). So, my real question is that is it smart to keep using C++ or do I have to eventually shift to .NET?
Thank you.
Chad -
...
void function(int a, int b)
{
int myArray[a][b];
}
int main()
{
int one, two;
cout << "Enter one: ";
cin >> one;
cout << "Enter two: ";
cin >> two;
function(one, two);
return 0;
}
int** myArray;
myArray = new int*[a];
for(int i = 0; i < a; ++i)
myArray[i] = new int[b];
for(int i = 0; i < a; ++i)
delete myArray[i];
delete myArray;
Correct. If it's anything like malloc in C, new returns a memory address that points to some free space, which you're setting myPointer equal to. It won't necessarily be the same space. If you don't want it to use a different address, don't delete it until later on.This actually worked! Thank you very much for this. I am now reading a tutorial on it.
One question about the delete. The delete deletes the memory (address) the pointer points to, not the pointer itself, right? So, when using dynamically allocated memory (new), I have to end it with delete. What if I wanted to re-use a piece of code I previously deleted its memory and function? Are there cases were I may not use the delete keyword? OR does it re-allocate on its own when new is encountered? Note that I want it to stay at the same address. If it does re-allocate, it looses its memory location (I.E its address), right?
Example:
Say, myPointer was stored in address 0x08FF8000. When you use delete, myPointer looses its memory location. If it re-allocates, it does not store itself again in the same address, right? I want to use the address (0x08FF8000). I don't want it to be stored in another location.
I hope this makes any sense, because somehow to me, it doesn't a lot. Lol.
twocows is right... new[] and delete[] are like malloc() and free().Correct. If it's anything like malloc in C, new returns a memory address that points to some free space, which you're setting myPointer equal to. It won't necessarily be the same space. If you don't want it to use a different address, don't delete it until later on.
twocows is right... new[] and delete[] are like malloc() and free().
Also don't forget... Unlike 2D arrays, the memory is not continuous... Like for int nums[2][3]
Memory would hold nums[0][0], nums[0][1], nums[0][2], nums[1][0], nums[1][1], nums[1][2] in the order continuously...
But since you call new[] for every element in the int**, every element may not be together... ie, the values are not continuous.
This would only matter in a few cases, but meh, just telling you.
int myValue = 10;
int *myPointer = new int;
myPointer = &myValue // address of myValue (&)