Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:12:18+00:00 2026-06-05T03:12:18+00:00

I am designing a chess game using the UCI Protocol. The program requires line

  • 0

I am designing a chess game using the UCI Protocol. The program requires line commands as input.

My question is if I need a function separate from the main() function for parsing these commands, and also how to I get the input for parsing? I realize that char* argv is named in the function parameter, but I found that using argv = cin.get() didn’t work.

I have looked at many tutorials and none of them answer either question.

Also I’m sorry if this is badly worded.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:12:20+00:00Added an answer on June 5, 2026 at 3:12 am

    May I suggest non mythical programming:

    #include <string>
    #include <vector>
    
    int main(int argc, char**argv)
    {
        const std::vector<std::string> args(argv, argv+argc);
    
        // be merry and use `args`
    
    }
    

    Update Hmm. I guess you meant console/standard input. In that case, a read loop might be what you want:

    std::string line;
    while (std::getline(std::cin, line))
    {
         // process command in line
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help in designing a Chess game. I've already started but haven't got
I have faced a problem while designing chess game. There are 2 Player: p1,
I am designing a game where user and computer play in alternate turns(like chess).
Designing a generative music system for iOS, using OpenFrameworks, I'd need to provide a
Im designing a website, and often I need to present information in a nice
Im designing a multi cleint web server using multithreads in C using Pthreads, i
for designing purposes i need to truncate all DB which has lots of FK's.
When designing an rdlc report using the VS 2010 report designer, report items such
the designing.making/deploying/management of a distributed database? or do i need to buy the versions
I designing an programming a website using Symfony2. I completed some parts and checked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.