cobain wrote:The questions that follow are just out of curiosity as to the limitations of C++[..]
There is no such thing as a limitation with C++. Name one thing that it can't do that doesn't direcly manipulate hardware (that's assembly). There are things that you aren't allowed to do, and there are ways in which you must do things, but anything is possible there are no limits.
cobain wrote:1) Is there any way to decompile a program written in C++ back into C++?
Yes and no. Yes there are a couple of "would-be decompilers out there". They are all garbage and don't even work in the least. You don't realize how complicated it'd be to make one. Also, it's good that they don't. Would you like for all of your work and stuff to be easily stolen by decompilation? I think it's garbage myself.
cobain wrote:2) What types of applications are there besides console and windows? What is a "windows application" typically used for? And a console application?
Windows application is like NEStix Chaotix, Doom 3, Half-Life 2, games/applications for windows. Console application is like what you're doing. Black boxage.
What types of applications besides them? Maybe you should ask the reverse. Dude, I program DREAMCAST, Sega's 128-bit console with C++. There is really an infinate amount of applications with C++.
cobain wrote:3) Is it possible for a program to access another program to graph something or fill in specified pixels? Can a console app. access the internet if a URL is specified? (Keep in mind, I dont want to know how to do it, just if it can be done Very Happy )
Access another program to graph or fill in specified pixels. Umm... yeah, it's possible, but I really don't see any point there. What'd that be for?
Console app accessing the internet? Of course! You'd need to learn about sockets and stuff though.
cobain wrote:4) Is it possible to make a console application factor a number (ie. 52) or a trinomial (ie. 7x^2 + 5x - 7) ?
OF COURSE THAT'S POSSIBLE! Man, the console is offended. That's nothing. Trinomial is still possible, but it'd be a pain in the ass to make.
cobain wrote:5) Lastly, I do actually need help w/ how to do this stuff, and my book requires that some of it be done. I need certain math symbols while programming (ie. a square root or cubed root). JS Lemming told me to put at the top
This is C++ so you might wanna do this instead.
What JSL showed you is C-style.
If you really want to see what is in cmath/math.h, why don't you just open it up in your Dev environment?
Really quick, you'd do this for powers:
Code: Select all
pow(variable/number, power you want it raised to);
for example I could say:
That squares 2 making it 4.
Here is a nice site to give you the low-down of math.h:
http://www.cplusplus.com/ref/cmath/
cobain wrote: Also, how can you define different namespaces? Just replace the "std" with something else?
yep.
cobain wrote:Can two or more different namespaces be called upon during the same program? (I actually would do nothing with this information, I am just curious).
No, a namespace tells the compiler where all of the functions are. You can't say that all of the functions are from 2 libraries (I don't think). There is an alternative, I can show you later, but I don't wanna overload you now.
cobain wrote:And VERY lastly, is
a different namespace from STD?
Okay, this part might get complicated. No, it is not. math.h is just a group of functions. They aren't in a class/struct so they're
global meaning that they can be accessed anywhere in the program without specifying where they are from.
Cin and Cout are in a class. That means that you must call/reference theme through the class. When you say that you're using namespace std;, you're saying to make all of the functions in the class globals so that they can be accessed anywhere without having to specify the class they are from.
cobain wrote:I am just a curious little guy Very Happy :D
yeah, that's cool. I've never heard anybody ask that namespace question. I'm sure you won't understand that explanation fully (I sure wouldn't of), but don't worry, no biggie. If you have any more questions, just post. :D