Results 1 to 5 of 5
  1. #1
    how to insert variable's value?

    Member Since
    Jul 15, 2013
    Posts
    1
    how to insert variable's value?
    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

  2. #2
    how to insert variable's value?
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,081
    Specs:
    13in macbook - 10.10.4
    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
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  3. #3
    how to insert variable's value?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  4. #4
    how to insert variable's value?
    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    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!

  5. #5
    how to insert variable's value?
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,186
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. path environment variable
    By blackwaterdev in forum Switcher Hangout
    Replies: 5
    Last Post: 04-04-2013, 04:06 AM
  2. Applescript Curl and Variable Help
    By FallenAsh in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 01-06-2013, 01:59 PM
  3. Wildy Variable wireless speeds
    By foxwelljsly in forum Internet, Networking, and Wireless
    Replies: 1
    Last Post: 02-25-2012, 03:42 PM
  4. Changing PATH variable
    By burnt1ce85 in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 06-08-2008, 03:47 AM
  5. environment variable needs to be changed
    By chris_101010 in forum OS X - Operating System
    Replies: 5
    Last Post: 09-25-2006, 12:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •