Home | Community | Message Board

Sporeworks
This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Shop: MagicBag.co Certified Organic All-In-One Grow Bags by Magic Bag   Myyco.com Golden Teacher Liquid Culture For Sale

Jump to first unread post Pages: 1
C++ question any programmers out there?
    #8513299 -

I'm writing a c++ program that will run on a linux server and I want to be able to send in a filename when I open the program.  For example:

$>./a.out addyTemp.txt

Program runs blah blah.  But I want to send this in when I execute the program not after its running it's important it works like that for a php script I'm writing.  Any help is appreciated.


--------------------
"I mean, it's like a koala bear crapped a rainbow in my brain!"
-Captain Murphy

"Quit being a bitch and pill me up"
-Dr. Quinn

"Smoke that bitch"
"I am not Stormy, I am He who smokes Bitches!"
-Stormy

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: Gainer]
    #8513373 -

Think I found what I'm looking for, or something that will work anyway.  There is another way to do it; if anyone knows how I'd still like to know.

Quote:
When we need to take input from a file (instead of having the user type data at the keyboard) we can use input redirection:

% a.out < inputfile

This allows us to use the same cin calls we use to read from the keyboard. With input redirection, the operating system causes input to come from the file (e.g., inputfile above) instead of the keyboard.




--------------------
"I mean, it's like a koala bear crapped a rainbow in my brain!"
-Captain Murphy

"Quit being a bitch and pill me up"
-Dr. Quinn

"Smoke that bitch"
"I am not Stormy, I am He who smokes Bitches!"
-Stormy

Extras: Filter Print Post Top
Re: C++ question any programmers out there? *DELETED* [Re: Gainer]
    #8513411 -

Post deleted by begreen0

Reason for deletion: privacy



--------------------
Memantine, is in my ears, and in my eyes


Exercise, is easily one of the best things you can do for generating pleasure, confidence, health, and sustained well-being. Really.

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: begreen0]
    #8513446 -

Yeah man thanks a lot.  You know I've been programming in c++ for more than 4 years and never knew what those arguments were for.  Shitty ass teachers never explained it.  That helped me out a lot man double thanks.  And 5 shrooms for you.


--------------------
"I mean, it's like a koala bear crapped a rainbow in my brain!"
-Captain Murphy

"Quit being a bitch and pill me up"
-Dr. Quinn

"Smoke that bitch"
"I am not Stormy, I am He who smokes Bitches!"
-Stormy

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: Gainer]
    #8513838 -

I took C++ once, but I have no idea what you are talking about. 

:gethigh:

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: DieCommie]
    #8514171 -

NERDZZZZ



--------------------



Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: HELLA_TIGHT]
    #8514209 -

jock


--------------------
We were sent to hell for eternity :hellfire: Ø:omgawesome:h®
We play on earth to pass the time :foreheadslap:

Over-population the root of all Evil-brings the Elites Closer to the gates.

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: Gainer]
    #8514290 -

Why didn't they name C++ "D"?


--------------------
Every Animal Is Someone 🌱 watchdominion.org

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: ivi]
    #8514327 -

There is a D. But C++ came first... I guess they just called it that because it's really just an addon to C? They still could have come up with a more pronounceable name, like C2.


--------------------
I know... that just the smallest
                                                part of the world belongs to me
You know... I'm not a blind man
                                                    but truth is the hardest thing to see

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: zouden]
    #8514358 -

Z++ will be the answer to life, universe and everything, not 42.


--------------------
Every Animal Is Someone 🌱 watchdominion.org

Extras: Filter Print Post Top
Re: C++ question any programmers out there? [Re: ivi]
    #8517800 -

Because it is C with object oriented features, not an entirely different language :smile:

Extras: Filter Print Post Top
Jump to top Pages: 1

Shop: MagicBag.co Certified Organic All-In-One Grow Bags by Magic Bag   Myyco.com Golden Teacher Liquid Culture For Sale


Similar ThreadsPosterViewsRepliesLast post
* Web Url Redirection Boom 599 4 11/26/05 03:43 PM
by VoidOfsPg
* The Land Of The Free (A question for Americans) Jackal 3,184 19 08/08/03 07:54 PM
by PDU
* HELP WANTED: we need 2 PHP programmers for the shroomery version of LOGD
( 1 2 all )
Fliquid 2,028 24 06/30/05 04:45 AM
by Fliquid
* Official Shroomery Shape-Up Program!
( 1 2 3 4 all )
Delyrium 9,686 70 05/04/04 10:36 PM
by utopianglory
* Plz help with a .SHN/.WAV related question.. Lightningfractal 1,155 6 01/02/04 09:32 PM
by Lightningfractal
* What downloading program do you use?
( 1 2 all )
User Exists 3,635 24 12/21/02 09:45 PM
by matts
* music downloading programs YouEnjoyMyself 1,181 14 05/10/04 11:37 PM
by DannyT
* Computer Question xXScYtHeXx 828 13 06/06/04 07:53 AM
by goobler

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: Entire Staff
1,174 topic views. 5 members, 1,094 guests and 170 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2026 Mind Media. Some rights reserved.

Generated in 0.028 seconds spending 0.008 seconds on 16 queries.