Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Which programming language should I learn? (Updated)
Index -> General Programming
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
PaulButler




PostPosted: Wed Aug 01, 2007 9:29 pm   Post subject: RE:Which programming language should I learn? (Updated)

From the sourceforge files, it looks like 5.1.3 is the latest.

Even if you do make comments, and you find comic sans as annoying as I do, it is easy to change.

Rather than copying the installed files, why not just copy the installer? But if you needed to, you could just copy the installed files and change your PATH environmental variable so you could use MinGW from the command line.
Sponsor
Sponsor
Sponsor
sponsor
michaelp




PostPosted: Thu Aug 02, 2007 8:32 am   Post subject: RE:Which programming language should I learn? (Updated)

If I'm not mistaken, you need an internet connection to get the files from a mirror, which the computer I'm going to use does not have.
Aziz




PostPosted: Thu Aug 02, 2007 8:55 am   Post subject: RE:Which programming language should I learn? (Updated)

I believe what he means is to download the .exe installer, then copy the installer to the other computer and run it from there.
wtd




PostPosted: Thu Aug 02, 2007 11:25 am   Post subject: RE:Which programming language should I learn? (Updated)

JUst to make it easy, C Whirlwind.
michaelp




PostPosted: Thu Aug 02, 2007 11:46 am   Post subject: RE:Which programming language should I learn? (Updated)

Whatever.
I decided to learn C++ instead, just because.
And not gonna use MinGW, I'm going to use Dev-C++. Looks nice and easy to use.
One question about it: I just found a "Hello World" script, but when I get the .exe, (and run it) it goes on my a millisecond and then goes off. Anything I might be doing wrong?

code:
#include <iostream>

int main()
{
   std::cout << "Hello, world!" << std::endl;

   return 0;
}
Aziz




PostPosted: Thu Aug 02, 2007 11:55 am   Post subject: RE:Which programming language should I learn? (Updated)

Yes. The command line isn't staying open.

Btw, this was said before, but Dev-C++ isn't a compiler, it's an IDE (editor). It uses MinGW. The best way to start would be to use MinGW from command line. Because you'll realize what the program is doing (such as linking, etc). The line to compile the program (I wouldn't use "script" to define it) is:

code:
g++ helloworld.cpp -o helloworld.exe


(wtd, correct me if I'm wrong).

Then you have to run it. If you double click the exe, and runs, gets to "return 0", returns from main, and terminates. There is no more use for the terminal window, so it closes. If you run the following on command line:

code:
helloworld.exe


or even

code:
hellowworld


that will cause the program to run, and then terminate, and you will go back to your prompt,with the output still showing.

You could write a script to run it and keep the window open:

DOS batch file:
code:
@echo off
helloworld.exe
pause


And, I believe Dev-C++ has a bad "stigma" round the community, though it is quite popular. I myself use a text editor and command-line (my work with C++ is minimal). I do have Code::Blocks, which many more people are endeavored to (is that a word?).
rdrake




PostPosted: Thu Aug 02, 2007 11:56 am   Post subject: Re: RE:Which programming language should I learn? (Updated)

michaelp @ Thu Aug 02, 2007 11:46 am wrote:
Whatever.
I decided to learn C++ instead, just because.
And not gonna use MinGW, I'm going to use Dev-C++. Looks nice and easy to use.
Dev-C++ uses MinGW as its compiler, all it is is an IDE that makes managing larger projects easier. It should also be noted that MingGW includes compilers for both C (gcc.exe) and C++ (g++.exe).
michaelp @ Thu Aug 02, 2007 11:46 am wrote:
One question about it: I just found a "Hello World" script, but when I get the .exe, (and run it) it goes on my a millisecond and then goes off. Anything I might be doing wrong?
Nope, doing nothing wrong. The window outputs "Hello, world!" then terminates since it's done executing. You could change it to the following to have it pause:

c++:
#include <iostream>

int main()
{
   std::cout << "Hello, world!" << std::endl;
   system("PAUSE");

   return 0;
}


Edit: Beaten by Aziz.
michaelp




PostPosted: Thu Aug 02, 2007 12:00 pm   Post subject: Re: RE:Which programming language should I learn? (Updated)

Aziz @ Thu Aug 02, 2007 11:55 am wrote:
Yes. The command line isn't staying open.

Btw, this was said before, but Dev-C++ isn't a compiler, it's an IDE (editor). It uses MinGW. The best way to start would be to use MinGW from command line. Because you'll realize what the program is doing (such as linking, etc). The line to compile the program

I don't sweat the small details.
I thought that I might be doing something wrong, thanks for those bits of information.
I think I can actually start to do some programming now. Razz
Sponsor
Sponsor
Sponsor
sponsor
Aziz




PostPosted: Thu Aug 02, 2007 12:00 pm   Post subject: RE:Which programming language should I learn? (Updated)

Word.

But in due note, I didn't know of that system("PAUSE") call. Though, how hackish is that?
rdrake




PostPosted: Thu Aug 02, 2007 12:03 pm   Post subject: Re: RE:Which programming language should I learn? (Updated)

Aziz @ Thu Aug 02, 2007 12:00 pm wrote:
But in due note, I didn't know of that system("PAUSE") call. Though, how hackish is that?
It's quite hackish and I do believe it only works on Winders. All it does is execute the system command "PAUSE."
Aziz




PostPosted: Thu Aug 02, 2007 12:10 pm   Post subject: Re: RE:Which programming language should I learn? (Updated)

michaelp @ Thu Aug 02, 2007 1:00 pm wrote:
Aziz @ Thu Aug 02, 2007 11:55 am wrote:
Yes. The command line isn't staying open.

Btw, this was said before, but Dev-C++ isn't a compiler, it's an IDE (editor). It uses MinGW. The best way to start would be to use MinGW from command line. Because you'll realize what the program is doing (such as linking, etc). The line to compile the program

I don't sweat the small details.
I thought that I might be doing something wrong, thanks for those bits of information.
I think I can actually start to do some programming now. Razz


You should sweat the small details, especially with C++. I'm no expert, but I've read before about "cryptic linker errors" and if you don't understand whats going on in the background, you're going to be yanking hairs out. Not just the ones on your head. I'm talking, like, crotch and armpit hairs.
wtd




PostPosted: Thu Aug 02, 2007 2:19 pm   Post subject: RE:Which programming language should I learn? (Updated)

So... what's wrong with learning simple, elegant programming languages?

code:
print "Hello, world!"


code:
puts "Hello, world!"


code:
print_endline "Hello, world!"


code:
"Hello, world!" println


code:
(begin
  (display "Hello, world!")
  (newline))


Beats the pants off this "int main" and "std::cout <<" nonsense any day! Smile
Aziz




PostPosted: Thu Aug 02, 2007 2:24 pm   Post subject: RE:Which programming language should I learn? (Updated)

I was going to tell you that you were posting off topic, wtd, but then I looked at the topic title =\

What's that 3rd code sample from?
rdrake




PostPosted: Thu Aug 02, 2007 2:37 pm   Post subject: Re: RE:Which programming language should I learn? (Updated)

Aziz @ Thu Aug 02, 2007 2:24 pm wrote:
What's that 3rd code sample from?
code:
Objective Caml version 3.10.0

# print_endline "Hello, world!";;
Hello, world!
- : unit = ()
Aziz




PostPosted: Thu Aug 02, 2007 2:38 pm   Post subject: RE:Which programming language should I learn? (Updated)

...I'm lost.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 5 of 8  [ 111 Posts ]
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Jump to:   


Style:  
Search: