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 6748977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:38:00+00:00 2026-05-26T12:38:00+00:00

char ParseCmd(char *buf,int len) { char *p; p = strtok(buf, ); return *p; }

  • 0
char ParseCmd(char *buf,int len)
{
     char *p;
     p = strtok(buf," ");
     return *p;
}

Why does this function only return first symbol in a whole buffer? If I set buffer to a “fsa rew qwe” it returns only “f” instead of the expected “fsa”.

“mÀ£*” – that is now im getting. why ?

char dum = *InstList->Lines->GetText();
LoadLibrary("SyntaxP.dll");
char *dum1 = ParseCmd(&dum,32);
InstList->Lines->Add(dum1);

  • 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-05-26T12:38:01+00:00Added an answer on May 26, 2026 at 12:38 pm

    Because your return type is char which represents a character and you dereference the pointer returned by strtok().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

char *strtok(char *s1, const char *s2) repeated calls to this function break string s1
I made this function: char** parse_cmd(const char* cmdline) { int i; int j =
char *myfunc() { char *temp = string; return temp; } In this piece of
char testStr[] = trim this ; char** pTestStr = &testStr; trim(pTestStr); int trim(char** pStr)
char *funcNames[]= {VString,VChar,VArray,VData}; for(int i=0;i<4;i++) { char* temp = funcNames[i]; int len = strlen(funcNames[i]);
char first[10]; char second[10]; What does fscanf(fr,%s %s\n,first,second); do when first string is too
char *str = NULL; str = Operation(argv[1]); cout << Cal(str); Operation function return a
char *getInput2(char *param) { int data_len; data_len=atoi(getenv(CONTENT_LENGTH)); char input[9]; fgets(input, 9, stdin); return strdup
char *values = 3 1 4 15; vector<int> array; I want to populate the
char c='c'; int i=10; double d =50; long l=30; String s=Goodbye; Are these statement

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.