May 22, 201016 yr I pretty much started programming (I don't even know if I'm using the right words here :/) three days ago... So this is probably a really basic question. Yes, I have googled it... so yeah... I'm using Dev-C++ (I think it's called a compiler... Again, I don't really know much)... Whenever I compile and run my code, I get this: No matter what I say, It always does this. As long as there are no errors in what I typed, this will happen. It's been working fine up until a few hours ago. I don't know how to fix this :/ Also, whenever I highlight something, it covers it in a black box type thing instead of being able to see what you highlighted. Again, I have virtually no programming experience, so all help will be appreciated and stuff :/ I don't even know if this is the right forum to ask this in :wall: Sorry if it's not :/ YouTube
May 22, 201016 yr Definitely seems like the right forum, always cool to see someone starting to program. What you will want to do though is really highlight your problem. From what I can tell, the output all makes sense. It's requesting a number, choosing a random power then displaying the output value of the number to that power, then stating what it did. I can't quite tell what it is that was working before, and yet isn't now. Another thing that dramatically helps anyone looking to help is posting the source-code of the program. That way we can look through it and find the issue rather than guess-work. ;)
May 22, 201016 yr What exactly are you trying to do? I see nothing wrong per se. "It's not a rest for me, it's a rest for the weights." - Dom Mazzetti
May 22, 201016 yr Author Definitely seems like the right forum, always cool to see someone starting to program. What you will want to do though is really highlight your problem. From what I can tell, the output all makes sense. It's requesting a number, choosing a random power then displaying the output value of the number to that power, then stating what it did. I can't quite tell what it is that was working before, and yet isn't now. Another thing that dramatically helps anyone looking to help is posting the source-code of the program. That way we can look through it and find the issue rather than guess-work. ;)It doesn't matter what the source code is, it always does: As long as there are no errors in the source code, it will always run that program or whatever. I want it to do what I tell it to do :/ YouTube
May 22, 201016 yr I've not got much experience with Dev-C++, but from that my immediate question would be - are you recompiling the modified source-code and running the appropriate compiled executable to test it? It could well be you're running an old one and hence just getting the old results.
May 22, 201016 yr Author I've not got much experience with Dev-C++, but from that my immediate question would be - are you recompiling the modified source-code and running the appropriate compiled executable to test it? It could well be you're running an old one and hence just getting the old results.I just deleted all of the old code and typed something new. I don't really understand your question completely, but I'm pretty sure I was doing what you think I was doing... I just started a new source file and it works now... :wall: Thanks for the help :P YouTube
May 22, 201016 yr I just deleted all of the old code and typed something new. I don't really understand your question completely, but I'm pretty sure I was doing what you think I was doing... I just started a new source file and it works now... :wall: Thanks for the help :PAh well, that's all good then! :) C++ is a compiled language, in that the source-code that you write has to be compiled by the compiler into another form before it can be executed. In this case, it should compile it to an executable file. (From the image, "Junk[Caution: Executable File]") What this means is that whenever a change is made to the source-code, the code that you write, that needs to be re-compiled to form the executable that you run to actually launch the program. However, as I'm not sure on Dev-C++ it could well be that that's all essentially done in the background without it being apparent, in a similar fashion to how most IDEs do it with Java, it still compiles but you don't need to do anything in the command-line sense. :)
May 23, 201016 yr Go to http://pastebin.com/ and paste your source there and link us to it. I think where you are having trouble is in the "6.04941e+067" line. Do you want it to contain a real number like 3,6,etc? [software Engineer] - [Ability Bar Suggestion] - [Gaming Enthusiast]
May 23, 201016 yr Author There is no longer a problem :P I don't think I explained it very well and I still can't :wall: No matter what I changed the source code to, it would still do that :wall: Example: #include <iostream> int main(){using namespace std;cout << "Hi" << endl;system("pause");return 0;} still gave me YouTube
May 23, 201016 yr Then you're not clicking the right executable. Either that or you changed the code and didn't compile. The code you put here does something like:
May 23, 201016 yr Then you're not clicking the right executable. Either that or you changed the code and didn't compile. The code you put here does something like: His problem was that his previous code was still loaded into the compiler buffer. Instead of running his new code, the compiler would use his old code. All he had to do was compile his new code before running it and it would've fixed his problem. [software Engineer] - [Ability Bar Suggestion] - [Gaming Enthusiast]
May 24, 201016 yr Dev-C++ has an atrocious build system. Use Visual Studio 2010 Express or Code::Blocks; basically, anything else. Dev-C++ probably doesn't think your code is updated and doesn't rebuild.
July 1, 201016 yr Dev-C++ is obsolete; there have been no updates since 2005. You should switch to Code::Blocks or Visual Studio 2010. Never trust anyone. You are always alone, and betrayal is inevitable.Nothing is safe from the jaws of the decompiler.
Create an account or sign in to comment