LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-18-2005, 02:11 PM   #1
jp-lack
Member
 
Registered: Mar 2005
Location: NJ - US
Distribution: Slackware
Posts: 93

Rep: Reputation: 15
C/C++ - two questions...


I want to learn C and C++ but i do not know where to start... I mean... I'am using slackware 10.1...

1. do i need any special program to write the code?? or can I use any text editor and save it as *.c ???

2. How do I compile the code?? and How to run it??

any help would be appreciated...
 
Old 06-18-2005, 02:15 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Your questions are not specific to Slackware, you should post this to the programmer's forum.
But anyway:
1: any
2: gcc <source.c>
should get you started.
 
Old 06-18-2005, 02:18 PM   #3
jp-lack
Member
 
Registered: Mar 2005
Location: NJ - US
Distribution: Slackware
Posts: 93

Original Poster
Rep: Reputation: 15
sorry... didn't know....

thankx 4 the answer...
 
Old 06-18-2005, 02:57 PM   #4
GlowGlow
Member
 
Registered: Jun 2005
Posts: 111

Rep: Reputation: 15
And C++ code can be compiled with g++, e.g.

g++ hello.cpp

It is usual to at least specify an output file (or the output file will be a.out):

gcc -o hello hello.c
g++ -o hello hello.cpp

If I may give you an advice: if you start C++ programming it may be interesting to look at the Qt toolkit. In contrast to what many people believe this is not just a widget toolkit, but it is a fairly complete class library that has classes for regular expressions, I/O, threads, XML, etc. plus some STL-like container classes. Qt is available from the kde diskset, and includes excellent documentation (via assistant) and a GUI designer (designer). There also is a very good book in PDF format:

http://phptr.com/content/images/0131...hette_book.pdf
 
  


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
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 11:50 AM
Solaris - Questions! Questions! Questions! qs_tahmeed Solaris / OpenSolaris 2 07-16-2005 05:27 AM
window manager questions and/or theme questions t3gah Linux - Software 2 02-27-2005 04:16 PM
Some questions... CryptDragoon Linux From Scratch 2 02-04-2004 08:28 PM
few questions? pudhiyavan Linux - General 2 10-03-2003 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:42 AM.

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