Results 1 to 4 of 4
  1. #1
    treeham's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    heh. Turn around.
    Posts
    200
    Reputation
    10
    Thanks
    41
    My Mood
    Cynical

    [Help]help.exe -h?

    So basically I want to make a program that uses the -h -l -s and so on things (not to sure what their called, which makes it difficult to google)

    E.G.
    Code:
    C:\WINDOWS\>example -h
    I've seen a open-source program that does it and I've tried to extract what it uses into my program but it never seems to work. (compiled perfectly fine but crashed when I try to use the arguments)
    (it used the arguments in main() to "scan" for the letters)

    I thought I would ask you guys for a lil but of help.
    In Choob Language:
    also for all your info.. i didnt copy and paste shit.. coz i dont think anyone has realeased any source code for the New update of CA.. so sdfu..
    In English:
    I didn't copy and paste because no one has released what I need copy and paste
    Oh Choobs...

  2. #2
    Arhk's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Engineering
    Posts
    3,618
    Reputation
    35
    Thanks
    217
    My Mood
    Amused
    Use a switch()
    ~
    "If the world hates you, keep in mind that it hated me first." John 15:18

  3. #3

  4. #4
    zhaoyun333's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    396
    Reputation
    11
    Thanks
    1,125
    They are called parameters. Heres an example:

    Code:
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    int main(int argc,char *argv[], char *envp[]){ //number of command line arguments , command line strings
    
    for(int i=0;i<argc;i++)cout<<argv[i]<<endl;
    
    
    
    }
    If you type in "example -asd -dvdsv -asdsa 1231" in command line the program will output
    Code:
    (folder path)\example.exe
    -asd
    -dvdsv
    -asdsa
    1231
    In your main function you have argc and argv. argc is the number of arguments in argv and argv contains these strings. The first string in argv is the file path and the rest are parameters.
    There are five possible operations for any army. If you can fight, fight; if you cannot fight, defend; if you cannot defend, flee; if you cannot flee, surrender; if you cannot surrender, die." - Sima Yi

Similar Threads

  1. [Help Request] please i need ur help norton deleted (crossfire.exe) and the game stoped
    By nooraleman in forum CrossFire Help
    Replies: 22
    Last Post: 05-14-2011, 07:00 PM
  2. [HELP] .exe From Resource[Solved]
    By Lyoto Machida in forum Visual Basic Programming
    Replies: 13
    Last Post: 01-22-2011, 03:46 PM
  3. [Help] .exe?
    By WalterFalter in forum Alliance of Valiant Arms (AVA) Help
    Replies: 1
    Last Post: 07-10-2010, 12:40 AM
  4. [release]dlux colors.exe[Help me]!!!
    By Edge15 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 04-17-2007, 01:53 PM
  5. need some help with client exe.
    By barney in forum Hack Requests
    Replies: 2
    Last Post: 11-03-2006, 10:05 PM