super noob question

This is a discussion on super noob question within the C++ Programming forums, part of the General Programming Boards category; This is gotta be the worst question ever....but I'm sure I'm making someone who loves to "know it all"'s day...lol....how ...

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    super noob question

    This is gotta be the worst question ever....but I'm sure I'm making someone who loves to "know it all"'s day...lol....how the heck to you run something from the cmd line with args??? I've written some rather large, detailed stuff but never used the cmd line..

  2. #2
    ZuK
    ZuK is offline
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Quote Originally Posted by verbity View Post
    This is gotta be the worst question ever....but I'm sure I'm making someone who loves to "know it all"'s day...lol....how the heck to you run something from the cmd line with args??? I've written some rather large, detailed stuff but never used the cmd line..
    Just type the name ot the program followed by the args, separated by spaces then press enter.
    This is a joke isn't it ?
    Kurt

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    start->run (enter)
    command (enter)
    program arg1 arg2 arg3... (enter)

  4. #4
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Sadly nope...like I said I've written all kinds of stuff...but just used void main(void)...
    at the professors request so I just never used it before....

  5. #5
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Do i use the solution file...the project file...the exe??

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    the exe

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    int main(int argc, char *argv[])

    argc is the number of args, argv is an array of strings containing the args
    argv[0] is always the name of the program

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another noob question
    By clb2003 in forum C Programming
    Replies: 4
    Last Post: 02-12-2009, 12:28 PM
  2. Noob printf question
    By lolguy in forum C Programming
    Replies: 3
    Last Post: 12-14-2008, 07:08 PM
  3. another super easy question
    By joker_tony in forum C Programming
    Replies: 5
    Last Post: 03-29-2008, 12:41 AM
  4. Real Noob question
    By Dark Greek in forum C++ Programming
    Replies: 8
    Last Post: 09-09-2007, 06:49 PM
  5. Hello everyone, super noob!
    By TiznaraN in forum C++ Programming
    Replies: 14
    Last Post: 09-30-2006, 11:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21