• Skip to primary navigation
  • Skip to content
  • Skip to footer
Welcome to the development world of chp Welcome to the development world of chp
  • categories
  • tags
    1. 홈
    2. /
    3. Programming language
    4. /
    5. Rust
    6. /
    7. Grammar
    8. /
    9. Rust: 커맨드 라인 인자
    chp

    chp

    99점이 100점이 되기 위해 일을 더하는 개발자

    • South Korea
    • Website
    • GitHub

    Rust: 커맨드 라인 인자

    최대 1 분 소요

    목차

    • 개요
    • 예제
      • 코드
      • 실행 결과

    개요

    • 첫 번째 값은 프로그램의 경로


    예제

    • 코드

            use std::env;
    
            fn main() {
                let args: Vec<String> = env::args().collect();
                println!("{:?}", args);
            }
    
    • 실행 결과

            $ cargo run a b 1 2
            ["target/debug/greprs", "a", "b", "1", "2"]
    

    태그: command line arguments

    카테고리: grammar, programming-language, rust

    업데이트: September 8, 2023

    공유하기

    X Facebook LinkedIn Bluesky
    이전 다음

    참고

    React: 실무 패턴

    3 분 소요

    개요

    React: 테스트 (Vitest, Testing Library)

    2 분 소요

    개요

    React: shadcn/ui

    1 분 소요

    개요

    React: Tailwind CSS

    1 분 소요

    개요

    • 팔로우:
    • GitHub
    © 2026 Welcome to the development world of chp. 제작 지원: Jekyll & Minimal Mistakes.