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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:43:37+00:00 2026-06-15T12:43:37+00:00

I declared the following char* and tried to pass it to a function that

  • 0

I declared the following char* and tried to pass it to a function that requires a char * as the 3rd argument:

char *echo;
prompt = ssh_userauth_kbdint_getprompt(primarySession, 0, echo);

However, I get the error:

error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

I also tried declaration as char echo; and the passed argument as &echo. But I don’t really need the value that this function changes in echo. So I wanted to pass NULL, but I guess I expected that to be a const. I also tried this trick:

char echo;
prompt = ssh_userauth_kbdint_getprompt(primarySession, 0, (char *)(&echo));

Still no success. Suggestions?

  • 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-15T12:43:38+00:00Added an answer on June 15, 2026 at 12:43 pm

    Look at the declaration of that function:

    const char *
    ssh_userauth_kbdint_getprompt (ssh_session session, unsigned int i, char *echo)
    

    Thus it is prompt that needs to be a const char * instead of a char *.

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

Sidebar

Related Questions

I have a project that requires the following. Four arrays will be declared in
I have declared the following struct: typedef struct _RECOGNITIONRESULT { int begin_time_ms, end_time_ms; char*
I've declared the following array of strings: char *arrayIndices[100] = {0}; I do a
Try the following on MSSQL 2005: select convert(char(2), 123) The key here is that
Having declared <xsl:param name='suffix'>some_string</xsl:param> I tried to use its value in a function call
I declared the following struct in my C++ program: struct person { char name[10];
I have a function declared like so: unsigned char** Classifier::classify(){ //... unsigned char **chars
I have a dictionary (formatters) declared in the following code that will have items
I have some code that does the following: while(some condition) { char *line[WORDLEN]; //do
I have the following code that adds data to a rapidjson::Document, declared thus: rapidjson::Document

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.