New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

how to insert variable's value?


Post Reply New Thread Subscribe

 
Thread Tools
LauM86

 
Member Since: Jul 15, 2013
Posts: 1
LauM86 is on a distinguished road

LauM86 is offline
hello, i have to insert the value of variables but when i write " ./a.out" command i can't insert them. The output i see from my console is: Usage: ./a.out <seed> <N_samples> <N_classes> <rho_class0> <serv_class0> <rho_class1> <serv_class1> ...
how can i do?
Thanks
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,896
cradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud of
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
Usually switches and/or variables are preceded by a -
For example: ./a.out -123 -foo etc.
Just curious, what exactly is a.out?

EDIT: Looked it up: https://en.wikipedia.org/wiki/A.out
If it is this, you're not finished with your compile.

Craig Domingue - resident redneck.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,671
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Moved to a more appropriate forum.

Do you have any sample code that we can look at from the section/method that handles switches?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,624
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Quote:
Originally Posted by cradom View Post
Usually switches and/or variables are preceded by a -
For example: ./a.out -123 -foo etc.
Just curious, what exactly is a.out?

EDIT: Looked it up: https://en.wikipedia.org/wiki/A.out
If it is this, you're not finished with your compile.
Doesn't have to be compiled, could be an interpreted language. No matter what, not enough info to even begin.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,325
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Code:
$ cat t1.c
#include <stdio.h>

int main(void)
{
    printf("Hello World\n");

    return 0;
}
My super secret code...sshhhh..

Code:
$ gcc t1.c
$ ls
a.out t1.c
By default, gcc creates the output named a.out, I would fix that with the call
Code:
$gcc t1.c -o t1
But based on the usage line that you are getting, the program just seems to expect a series of arguments passed in THAT order..

Cradom eluded to argument modifiers that allow people to pass arguments in ANY order, but this program might not support that..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks

Post Reply New Thread Subscribe


« Script Help to Silent Mounting Shares | Undefined symbols _main »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
word 2011 - can't insert symbols mguycooper OS X - Apps and Games 7 04-24-2014 04:58 AM
How to insert an image in a thread in this forum,please? Erika Community Suggestions and Feedback 9 05-05-2012 07:48 AM
How To Insert Cell In iWork Numbers kevintieu Switcher Hangout 2 04-09-2009 03:29 PM
How to insert Flash movie (shockwave) into PowerPoint slideshow? ChrisBale Running Windows (or anything else) on your Mac 0 09-09-2008 05:07 AM
Not able to set environment variables using .profile file. Shambhavi OS X - Operating System 3 04-08-2006 04:15 AM

All times are GMT -4. The time now is 03:33 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?