you can use this site
www.planetsourcecode.com
Tuesday, July 14, 2009
Is there a way to get the source code for a c++ program if you just have the c++ program?
practically if u have an exe file u cant generate c++ source code out of it at all
from object file decompiler may can
but its almost next to impossible
Is there a way to get the source code for a c++ program if you just have the c++ program?
a decompiler. or open source project .. will usually come with the code, or be easy to find.
Reply:I'm assuming it's not a debug version nor do you have the code in which to do a gcc dump...so no you can't get the original code.
However, you can reverse engineer it though. Either do it yourself or there are applications that can do it as well. Essentially what it does is take the compiled assembly instructions and reproduces code that will behave the same way.
Reply:its possible if you use a compiler that has a decompiler feature. but most of the compliers out there won't allow that :)
Reply:lol, that question makes no sense, what are you talking about, rephrase that differently
but, if i can answer that i would be tell you that, you can get source codes from the internet for free. or check in folders of the program that is installed on ur pc
Reply:Do you mean does the compiler have source code? No, there are several websites that have tons of source code specifically for C++.
Reply:No. There are a bunch of "kinda sorta" ways about it, but they're not what you're looking for.
For example, given a properly instrumented executable (a "debug version") will sometimes, depending on your platform, contain references to variables. But it doesn't contain the actual source, so this isn't what you're after.
Also, various people are working on decompilers. Some are very simple, basically disassembling into assembly language, and then making C which is essentially equivalent to the assembly language. As you can imagine, this is entirely unreadable. Other decompilers attempt to be more advanced, but the state of the art is not yet effective enough to be of any real use. They only recognize a few very rigidly defined constructs, and they can't really recognize general code. Also, one major problem with decompilers is that they have no way to make good guesses at what the original variable names were. (Imagine what your code would look like if all your variable names were replaced with r0, r1, r2, etc.)
So basically, even though there are some attempts at doing this, nothing right now is good enough to be of any use.
(It's worth noting that some people think that debug-mode executables contain source code. They don't; they just contain offsets into your source files, and when your IDE sees them, it combines them with the source files to make it look like you're seeing the code. To test this assertion, add a few lines to the beginning of your source file, and then start debugging, but without recompiling. You'll find that the debugger is out of step with what your source file says. This is because the IDE is just reading the source file. The point here is that if you didn't have the source file in the first place, the executable will be no help in getting the source back.)
Reply:Yes. Download a C++ compiler. It should generate the C++ source code from a .exe file.
http://www.dreamincode.net/forums/showto...
paid survey
from object file decompiler may can
but its almost next to impossible
Is there a way to get the source code for a c++ program if you just have the c++ program?
a decompiler. or open source project .. will usually come with the code, or be easy to find.
Reply:I'm assuming it's not a debug version nor do you have the code in which to do a gcc dump...so no you can't get the original code.
However, you can reverse engineer it though. Either do it yourself or there are applications that can do it as well. Essentially what it does is take the compiled assembly instructions and reproduces code that will behave the same way.
Reply:its possible if you use a compiler that has a decompiler feature. but most of the compliers out there won't allow that :)
Reply:lol, that question makes no sense, what are you talking about, rephrase that differently
but, if i can answer that i would be tell you that, you can get source codes from the internet for free. or check in folders of the program that is installed on ur pc
Reply:Do you mean does the compiler have source code? No, there are several websites that have tons of source code specifically for C++.
Reply:No. There are a bunch of "kinda sorta" ways about it, but they're not what you're looking for.
For example, given a properly instrumented executable (a "debug version") will sometimes, depending on your platform, contain references to variables. But it doesn't contain the actual source, so this isn't what you're after.
Also, various people are working on decompilers. Some are very simple, basically disassembling into assembly language, and then making C which is essentially equivalent to the assembly language. As you can imagine, this is entirely unreadable. Other decompilers attempt to be more advanced, but the state of the art is not yet effective enough to be of any real use. They only recognize a few very rigidly defined constructs, and they can't really recognize general code. Also, one major problem with decompilers is that they have no way to make good guesses at what the original variable names were. (Imagine what your code would look like if all your variable names were replaced with r0, r1, r2, etc.)
So basically, even though there are some attempts at doing this, nothing right now is good enough to be of any use.
(It's worth noting that some people think that debug-mode executables contain source code. They don't; they just contain offsets into your source files, and when your IDE sees them, it combines them with the source files to make it look like you're seeing the code. To test this assertion, add a few lines to the beginning of your source file, and then start debugging, but without recompiling. You'll find that the debugger is out of step with what your source file says. This is because the IDE is just reading the source file. The point here is that if you didn't have the source file in the first place, the executable will be no help in getting the source back.)
Reply:Yes. Download a C++ compiler. It should generate the C++ source code from a .exe file.
http://www.dreamincode.net/forums/showto...
paid survey
Can someone give me a source code in this c++ problem?
I have to make a program that will ask for an integer input to the user and the output will be the word translation of the number.
example: the user input 125..the output will be one hundred twenty five...
I think I have to use void in this program..
can someone help me?Please....
Thanks!
Can someone give me a source code in this c++ problem?
"I think I have to use void in this program.."
This leads me to believe that you haven't been in class quite as much as you should have been.
Now we at Answers don't judge you on your lack of attendance, but at the same time we won't do your homework for you. If you expect any help, show us what you've already tried or come back with a more specific question.
Good luck!
example: the user input 125..the output will be one hundred twenty five...
I think I have to use void in this program..
can someone help me?Please....
Thanks!
Can someone give me a source code in this c++ problem?
"I think I have to use void in this program.."
This leads me to believe that you haven't been in class quite as much as you should have been.
Now we at Answers don't judge you on your lack of attendance, but at the same time we won't do your homework for you. If you expect any help, show us what you've already tried or come back with a more specific question.
Good luck!
How to write the source code for the c++ language using the for loop that will output the following:?
[12345]
[1234]
[123]
[12]
[1]
How to write the source code for the c++ language using the for loop that will output the following:?
Dear,
Here it is in C++:
for(int i=5;i%26gt;=1;i--)
{
cout%26lt;%26lt;"[";
for(int j=1;j%26lt;=i;j++)
{
cout%26lt;%26lt;j;
}
cout%26lt;%26lt;"]"%26lt;%26lt;endl;
}
It would surely work. Free feel to write to me if any otherwise complications.
OM NAMAH SHIVAY
Reply:for (int i = 5; i %26gt;= 0; i--)
{
char[8] string;
for (j = 1; j %26lt;= i; j++)
{
sprintf("%s%d", string, j);
}
printf("[%s]\n", string);
}
That wasn't so hard, was it?
Reply:Recursively:-
Using a number
donum(int num) {
if (num %26gt;= 1) {
printf("[%d]\n", num);
donum(num / 10);
}
main () {
int num = 12345;
donum(num);
}
Using a string
doval(char *val) {
if (strlen(val) %26gt;= 1) {
printf("[%s]\n", val);
val[strlen(val) - 1] = '\0'; // Destructive! can be done a different way
doval(val);
}
main () {
char val[] = "12345";
doval(val);
}
There are others include using a loop.
Reply:# include %26lt;iostream.h%26gt;
void main
{
int i=1;
for(i=5;i%26lt;=1;i--)
{
cout%26lt;%26lt;"[";
for(j=1;j%26lt;=i;j++)
cout%26lt;%26lt;j;
cout%26lt;%26lt;"]"%26lt;%26lt;endl;
}
}
[1234]
[123]
[12]
[1]
How to write the source code for the c++ language using the for loop that will output the following:?
Dear,
Here it is in C++:
for(int i=5;i%26gt;=1;i--)
{
cout%26lt;%26lt;"[";
for(int j=1;j%26lt;=i;j++)
{
cout%26lt;%26lt;j;
}
cout%26lt;%26lt;"]"%26lt;%26lt;endl;
}
It would surely work. Free feel to write to me if any otherwise complications.
OM NAMAH SHIVAY
Reply:for (int i = 5; i %26gt;= 0; i--)
{
char[8] string;
for (j = 1; j %26lt;= i; j++)
{
sprintf("%s%d", string, j);
}
printf("[%s]\n", string);
}
That wasn't so hard, was it?
Reply:Recursively:-
Using a number
donum(int num) {
if (num %26gt;= 1) {
printf("[%d]\n", num);
donum(num / 10);
}
main () {
int num = 12345;
donum(num);
}
Using a string
doval(char *val) {
if (strlen(val) %26gt;= 1) {
printf("[%s]\n", val);
val[strlen(val) - 1] = '\0'; // Destructive! can be done a different way
doval(val);
}
main () {
char val[] = "12345";
doval(val);
}
There are others include using a loop.
Reply:# include %26lt;iostream.h%26gt;
void main
{
int i=1;
for(i=5;i%26lt;=1;i--)
{
cout%26lt;%26lt;"[";
for(j=1;j%26lt;=i;j++)
cout%26lt;%26lt;j;
cout%26lt;%26lt;"]"%26lt;%26lt;endl;
}
}
I have a source code written by c language can anyone convert it to hex file?
Are you just wanting to make it a .o file (object file)?
Email me from my profile or post some additional details here and I will check later. I can probably help you some.
Good Luck
I have a source code written by c language can anyone convert it to hex file?
Linux has a program called "hexdump" which might do what you want.
Email me from my profile or post some additional details here and I will check later. I can probably help you some.
Good Luck
I have a source code written by c language can anyone convert it to hex file?
Linux has a program called "hexdump" which might do what you want.
I need a source code for a c program that identifies five digit palindrome numbers?
Hope this link helps.It has the code for identifying a palindrome and also it has numerous other similar programs.Good Luck!!
I need a source code for a c program that identifies five digit palindrome numbers?
Game enhancement cheat codes are expensive
customer survey
I need a source code for a c program that identifies five digit palindrome numbers?
Game enhancement cheat codes are expensive
customer survey
What is source code in dev c++?
Source code in most computer languages is the readable text instructions that is compiled into processor binary code. Each language has specific syntax rules for object manipulation, methods, etc. for the compiler.
C++ is an instance of a well defined language specification that is supported by many compilers.
#include %26lt;iostream.h%26gt;
main()
{
cout %26lt;%26lt; "Hello World!";
return 0;
}
C++ is an instance of a well defined language specification that is supported by many compilers.
#include %26lt;iostream.h%26gt;
main()
{
cout %26lt;%26lt; "Hello World!";
return 0;
}
Subscribe to:
Posts (Atom)