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

  • SEARCH
  • Home
  • 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 6219115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:43:28+00:00 2026-05-24T07:43:28+00:00

I am trying not to use isSpace function so the only thing came to

  • 0

I am trying not to use isSpace function so the only thing came to mind is strcpy but I am getting an error

while ( walker > 0 &&   strcmp(a[walker - 1],space_const) )

Warning 86: argument 1 conflicts with formal definition

Anyone know how to fix this issue? space_const is a char initialized as " "

char* strTrim(char* string)
{
 char* a= string;

 char delims[3];
 char space_const[] =" ";
 char syntax_const[]=" \t\n\v";
 size_t walker = strlen ( a );
 strcpy(delims,space_const);
 /* Trim trailing spaces */
 while ( walker > 0 &&   strcmp(a[walker - 1],space_const) )
   --walker; 

 a[walker] = '\0';

 /* Trim leading spaces */
 walker = strspn ( a,syntax_const);
 memmove ( a, a + walker, strlen ( a + walker ) + 1 );
 return extractCmd(a ,space_const );
}
  • 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-24T07:43:29+00:00Added an answer on May 24, 2026 at 7:43 am

    You are trying to compare a character (small integer) and a string.

    char* a= string;
    /*... */
    
    strcmp(a[walker - 1], space_const);
             ^ character
    

    strcmp looks like this

    int strcmp(const char *s1, const char *s2);
                      ^ string        ^ string
    

    It’s likely you want something like:

    (a[walker - 1] == ' ' || a[walker - 1] == '\t' || ..)
    

    You should write a function. but then you would end up rewriting isspace.

    Why can’t you use isspace in the first place ?

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

Sidebar

Related Questions

I'm trying to use TestDriven.Net not only to test my code, but to call
I'm trying to use JQuery Slidetoggle functionality, but not able to use properly. The
I'm trying to use JQuery toggle functionality, but not able to use properly. Instead
I'm trying to use Mole for Visual Studio but it's not loading. I've had
I'm trying to use this coding but its not processing, and its not outputing
I am trying to better understand when I should and should not use Iterators.
I'm trying to create a rails web app that does not use ActiveRecord framework
Trying to create Database as follows: USE Master GO IF NOT EXISTS(SELECT [Name] FROM
I'm trying to use the Microsoft.Sdc.Tasks.ServiceProcess.Exists to check whether or not a service exists.
I'm trying to use this formula in JAVA : (-ln(1-L))/L I'm not sure how

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.