LinuxQuestions.org
Review your favorite Linux distribution.
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 06-20-2002, 04:53 PM   #1
Eits0
Member
 
Registered: May 2002
Location: Finland
Distribution: Mandrake 9.0
Posts: 188

Rep: Reputation: 30
w00t!!! I started C++ programming!!!


After endless hours in mirc, and assisted by my engineer father, I have chosen my path.
I have allways wanted to write GOOD game, not some crappy text adventure in qbasic.

And many ppl have told that C++ is best suited for software programming, when C is more common in system programming (unix). I believe I can change some crappy parameters by now, if I want.
I don't actually have any use for that kind of programming (yet).

I loaned C++ programming manual with little over 800(!) sides, that oughta help me to start.

I just want to create my very own programs!!!
 
Old 06-20-2002, 05:06 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
When learning C++ it's much easier when you already know C. Without C, C++ is hard, especially when most manual start OO programming quickly not telling much about the basis.
 
Old 06-20-2002, 05:09 PM   #3
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
LOL. cool. Try C++ for Dummies. Its a great book. (No offense, I don't think you're a dummy, but its the name of the book)
 
Old 06-21-2002, 08:19 AM   #4
Eits0
Member
 
Registered: May 2002
Location: Finland
Distribution: Mandrake 9.0
Posts: 188

Original Poster
Rep: Reputation: 30
I know some C already.

My most impressive self programmed feat in C is program called Salasana (Password) made by me that starts every time I go to my own home folder.
It asks password 3 times, if given incorrectly all three times, it wont let me in.

Trying to hack it so that it will give command "shutdown -h now" to kernel if given incorrectly.

It also prints "Welcome to Matrix" if given correctly
 
Old 06-21-2002, 12:02 PM   #5
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Your program sounds dangerous to me. In order for you to have the program shutdown the system you will have to either set your program to be setuid root or 'shutdown' to be setuid root. You could have someone shutting down your machine from anywhere.
Anyway don't you have to log into your box only to be asked for the same password or a different password? If it's a different password, how do you store it?
 
Old 06-22-2002, 04:56 PM   #6
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Rep: Reputation: 15
I can use shutdown as a normal user...

~Progster
 
Old 07-08-2002, 10:25 PM   #7
dmason
LQ Newbie
 
Registered: Jul 2002
Distribution: Slackware 8.1
Posts: 7

Rep: Reputation: 0
for any system commands in C++

you can use <stdlib.h> and use the system("insertfunctionhere");
for example:
system("shutdown -h now");
would tell the program to shut down the computer. I hope that this helps you, and good luck with c++.
 
Old 07-10-2002, 08:55 PM   #8
Sam Hobbs
Member
 
Registered: Mar 2002
Location: Southern California
Distribution: Damn Small Linux (DSL) for now
Posts: 27

Rep: Reputation: 15
Re: w00t!!! I started C++ programming!!!

Quote:
Originally posted by Eits0
And many ppl have told that C++ is best suited for software programming, when C is more common in system programming (unix).
Some people react to discussions of C and C++ as if they are very different, yet actually C++ is a superset of C. Prior to C++ being standardized C++ was implemented using C pre-processor macros. For the experienced C++ programmer there are differences but for a beginner the differences are insignificant except that C++ just has more.

I suggest learning C++ first.
 
Old 07-16-2002, 08:50 AM   #9
Eits0
Member
 
Registered: May 2002
Location: Finland
Distribution: Mandrake 9.0
Posts: 188

Original Poster
Rep: Reputation: 30
Now, after day 11 on my book (yes, I've loaned it allmost month ago. Just too beautiful weather, too much friends and too much beer to hang inside.) I've finally finished my VERY FIRST GAME!!!!
Just simple text-adventure that prints something like "You see a well." then gives you choices like "a: Drink from it b: jump there c: blast it to oblivion d: run in panic!". Then you press some button and see concequenses!
I've already played it 10++ times over and over! It's sooooo good!
 
Old 07-16-2002, 10:02 AM   #10
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Congratulations! But beware: when you start coding, it's hard to stop..
 
Old 12-06-2002, 11:59 PM   #11
UNIX
LQ Newbie
 
Registered: Dec 2002
Location: EGYPT
Distribution: freeBSD,Mandrake
Posts: 5

Rep: Reputation: 0
Post language help

hi there !!
i'm new to pragramming
i want some useful books to c++

hOsam
.
.
.

Last edited by UNIX; 12-07-2002 at 12:01 AM.
 
Old 12-07-2002, 11:50 AM   #12
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
well... buy some...
 
Old 12-07-2002, 12:09 PM   #13
Sam Hobbs
Member
 
Registered: Mar 2002
Location: Southern California
Distribution: Damn Small Linux (DSL) for now
Posts: 27

Rep: Reputation: 15
The Association of C & C++ Users Book Reviews
 
Old 12-07-2002, 02:13 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: language help

Quote:
Originally posted by UNIX
hi there !!
i'm new to pragramming
i want some useful books to c++

hOsam
.
.
.
1. Bjarne Stroustrup - The C++ Programming Language, 3rd edition
a MUST, since it's *the* reference to the language.

2. Al Stevens & Clayton Walnum: Standard C++ Bible
For absolute beginners, is concise, not indepth and
has a few flaws :)

Cheers,
Tink
 
  


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
Please help ...... Getting started in programming Dream100110 Programming 20 05-23-2004 07:52 AM
Sockets Programming-Getting Started funkymunky Programming 3 01-09-2004 12:51 PM
I'm 21! w00t! KungFuHamster General 21 02-27-2003 09:24 AM
w00t! Aussie General 2 12-07-2001 07:32 AM
another "how do i get started?" programming question johncla Programming 4 06-02-2001 10:53 PM

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

All times are GMT -5. The time now is 04:30 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