LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2003, 08:55 PM   #1
TazLinux
Member
 
Registered: Dec 2002
Location: Phoenix
Distribution: Mandrake 9.2
Posts: 228

Rep: Reputation: 30
How to start


How can I start programming?


I would like to start with C, C+ etc etc.


Is there a program I need to start?
 
Old 02-20-2003, 09:21 PM   #2
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Use g++ on the command line for Standard C++ and gcc on the command line for Standard C console applications. Most books you buy on C and C++ will focus on the console. When you want to later build GUI applications than you can use Widget libraries such as GTK+ or QT. Or you can even use Java Middleware on Linux < http://members.shaw.ca/trollking >.
 
Old 02-20-2003, 09:24 PM   #3
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
Learning C is easy.
Every programmer starts programming with this program.
The program is very simple. Just to print a line.

#include <stdio.h>

int main()
{
printf("Hello, world\n");
return 0;
}


Type it out in any text editor and save it as any file name with extension ".c" say, "first.c".
At the command prompt, type
gcc first.c -o first

This will compile your program and produce the executable file called "first".

Then type
./first

to run the program. You will see the output "Hello, world" printed in the terminal.

There are a lot of resources on the C programming. You just search
"Linux C Programming" in google and you will get tons of results. Just browse through and pick a longer and complete guide you feel confortable with it. If you want solid hard copy, just print it out chapter by chapter. I think you don't even need to buy a book to start C programming. So many resources and ebooks on the net.

Last edited by moeminhtun; 02-20-2003 at 09:31 PM.
 
Old 02-21-2003, 03:20 AM   #4
TazLinux
Member
 
Registered: Dec 2002
Location: Phoenix
Distribution: Mandrake 9.2
Posts: 228

Original Poster
Rep: Reputation: 30
It worked, so does this mean I wrote my first program in C?
 
Old 02-21-2003, 03:20 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, it means you copied your first c program!
 
Old 02-21-2003, 04:01 AM   #6
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
Quote:
Originally posted by acid_kewpie
no, it means you copied your first c program!
[ Please encourage the newbies. ]


Yeah! You wrote your first C program!.

This is the starting point. Every C programs are base on this. You might want to browse through the net, find a tutorial and try to understand it. It's pretty easy.
 
Old 02-21-2003, 07:46 AM   #7
TazLinux
Member
 
Registered: Dec 2002
Location: Phoenix
Distribution: Mandrake 9.2
Posts: 228

Original Poster
Rep: Reputation: 30
thanks guys
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 01:59 PM
disable cold start and warm start snmp traps chkisco Linux - Newbie 0 10-28-2005 02:58 AM
fc2-gnome : Applications dont start / very slow to start nox104 Linux - Software 0 08-18-2004 08:53 PM
Can I gett KPPP to start when I start a browser on a network machine? duffboygrim Linux - Networking 0 03-25-2004 04:49 PM
cannot start kdeas user ,can start icewm,fluxbox jackren Debian 1 02-29-2004 11:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration