:: Dev-C++ ::
Author |
Message |
MiX-MaztA-M8riX
|
Posted: Sat Jan 15, 2005 12:35 pm Post subject: :: Dev-C++ :: |
|
|
Is this compiler good to start with?
I just want to know if there are any better FreeWare compilers along the lines of this program.
And if not.. Im having sum problems. Ewverytime I try to compile a damn code, it says it was not compiled successfully, even when I open the pre-made "Make A Hello World" program. ITs realy , REALLY, getting annoying.
Please And Thank You. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Sat Jan 15, 2005 4:52 pm Post subject: (No subject) |
|
|
Dev-C++ uses GCC (the GNU Compiler Collection) which is darn good, so it's not the compiler. It's just pretty much a flaw inherent to using an IDE (Integrated Development Environment) for learning. You spend more time figuring out which buttons to push than learning to write good code.
- Don't use C++ for learning. It's a big language with lots of very subtle gotchas.
- If you're devoted to learning C++ as a beginner language, use the command-line tools.
- Install MSYS from http://www.mingw.org.
http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
- Install GCC from the MinGW site.
http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
You may have to restart, especially if you're running Windows 98 or ME.
After restarting, launch MSYS. "Start Menu -> Programs -> MSYS -> MSYS" or something like that.
You'll see a window open with a bash shell prompt. The prompt ends in $.
At this prompt, type "which g++" to determine if G++ is accessible. If it isn't, reply here and I'll help you solve that problem.
If you can see G++, then create a new "Hello, world!" program by typing: "vi hello_world.cpp" and hitting enter.
The screen you're seeing is the vi text editor. Hit the "Insert" key on your keyboard. It should be located in the cluster of keys above the arrow keys.
Now you can insert text into your file. The program source code is:
code: | #include <iostream>
int main()
{
std::cout << "Hello, world!" << std::endl;
return 0;
}
|
Now, to get out of the text editor and return to the prompt, hit the escape key and type ":w" and enter to save, then ":q" and enter to quit.
Back at the prompt, the command to compile is going to be:
"g++ hello_world.cpp -o hello_world.exe"
Hit enter, and then at the prompt again type: "./hello_world.exe" and hit enter. You should see "Hello, world!" appear on the screen. |
|
|
|
|
|
MiX-MaztA-M8riX
|
Posted: Sat Jan 15, 2005 7:23 pm Post subject: (No subject) |
|
|
This isnt my first language, turing is (Gr. 10 Comp Sci.)
I dunno if its any help due to the extremely basic syntax
e.x.
put "Hello World"
as opposed to
{
commandhere ;"blahblah"
}
but thats the only thing I got under the belt so far.
and thanks for the help |
|
|
|
|
|
wtd
|
Posted: Sat Jan 15, 2005 7:50 pm Post subject: (No subject) |
|
|
MiX-MaztA-M8riX wrote: This isnt my first language, turing is (Gr. 10 Comp Sci.)
My recommendation is Ruby. Its syntax is something like Turing's, but it's a much more powerful, flexible language.
code: | procedure sayHelloWorld
put "Hello world"
end sayHelloWorld
sayHelloWorld |
code: | def say_hello_world
puts "Hello world"
end
say_hello_world |
|
|
|
|
|
|
MiX-MaztA-M8riX
|
Posted: Sat Jan 15, 2005 9:14 pm Post subject: (No subject) |
|
|
::EDIT::
The Link was invalid, its www.Ruby-Lang.org not www.rubylang.org
Hm... sounds simple enough.
Would this be another Stepping-Stone?
and whats it capable of? what kind of proggies does it, or should I say, Can it produce? |
|
|
|
|
|
wtd
|
Posted: Sat Jan 15, 2005 9:21 pm Post subject: (No subject) |
|
|
MiX-MaztA-M8riX wrote: ::EDIT::
The Link was invalid, its www.Ruby-Lang.org not www.rubylang.org
Thank you. Now I feel like an idiot.
MiX-MaztA-M8riX wrote: Hm... sounds simple enough.
Would this be another Stepping-Stone?
Everything is a stepping stone. The learning process never ends.
MiX-MaztA-M8riX wrote: and whats it capable of? what kind of proggies does it, or should I say, Can it produce?
It's a general purpose programming language. It can do pretty much anything you could ask about. It's especially well-suited to processing text, but by no means limited to that.
The real question is: What do you want to do? |
|
|
|
|
|
MiX-MaztA-M8riX
|
Posted: Sat Jan 15, 2005 9:40 pm Post subject: (No subject) |
|
|
Say I wanted to make a little 2d platformer, for starters.
Is it possible to retrieve keys from the user?
as in turings Input.KeyDown?
And to take it a step further, would you be able to implement, OpenGL, to, eventually create a little 3d world, for example. |
|
|
|
|
|
wtd
|
Posted: Sat Jan 15, 2005 9:48 pm Post subject: (No subject) |
|
|
MiX-MaztA-M8riX wrote: Say I wanted to make a little 2d platformer, for starters.
Is it possible to retrieve keys from the user?
as in turings Input.KeyDown?
And to take it a step further, would you be able to implement, OpenGL, to, eventually create a little 3d world, for example.
I should note that there's no built-in graphics library with Ruby, but then, most languages don't provide such a thing.
That said, there are a number of libraries that enable graphics from within Ruby. The Ruby Application Archive's Graphics category.
I would highly recommend becoming familiar with the fundamentals of any language first before attempting to tackle anything as complex and messy as graphics. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
MiX-MaztA-M8riX
|
Posted: Sun Jan 16, 2005 1:25 am Post subject: (No subject) |
|
|
Well, to grasp the main concept as you said... would there be any good tutorials on the basics somewhere?
That said, what would the basics be exactly?
:: EDIT ::
I just tried downloading 'Ruby' and all I had was a black screen, with options to turn to different programming languages or something like that.
Would you be so kind to try and get me, 'Ruby'? |
|
|
|
|
|
wtd
|
Posted: Sun Jan 16, 2005 1:33 am Post subject: (No subject) |
|
|
Sorry... this message is going to have to be kinda quick.
Tutorials:
http://poignantguide.net/ruby/ <-- very big, lengthy, but good
http://pine.fm/LearnToProgram/ <-- more concise, but also good
If you didn't see it before, the one-click installer for Ruby (for Windows 98/ME you should reboot after installing):
http://rubyforge.org/frs/?group_id=167
The tutorials should do a good job of explaining how you can run Ruby programs.
I'll help more later, but for now, good luck. |
|
|
|
|
|
MiX-MaztA-M8riX
|
Posted: Sun Jan 16, 2005 1:45 pm Post subject: (No subject) |
|
|
May have been short, but right to the point, thanks a lot |
|
|
|
|
|
Andy
|
Posted: Sun Jan 16, 2005 3:38 pm Post subject: (No subject) |
|
|
how about moving this into the right forum? |
|
|
|
|
|
wtd
|
Posted: Sun Jan 16, 2005 6:37 pm Post subject: (No subject) |
|
|
Andy wrote: how about moving this into the right forum?
It started in the right forum. |
|
|
|
|
|
wtd
|
Posted: Sun Jan 16, 2005 6:38 pm Post subject: (No subject) |
|
|
MiX-MaztA-M8riX wrote: May have been short, but right to the point, thanks a lot
Glad you found it useful.
Feel free to ask question in General Programming. Myself, Hikaru79, and Tony are all Ruby programmers, as well as others, I believe, so we can help you. |
|
|
|
|
|
|
|