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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:12:20+00:00 2026-06-13T09:12:20+00:00

I am making a project. This is a function declaration in a separate file.

  • 0

I am making a project.
This is a function declaration in a separate file.

void PrintLines(int characterValue, int characterCount, int lineCount)

When I prototype in my main file I use:

void PrintLines(char characterValue, int characterCount, int lineCount);

This will not compile. Are there any methods I can use to make it type char in the main method without changing the first int type(in the other file?

I think I have to type cast. Just have to figure out how.

Basically, the code has to be

 void PrintLines(int characterValue, int characterCount, int lineCount)

for file 1 and

 void PrintLines(char characterValue, int characterCount, int lineCount);

for main. I might need to convert ASCII to char…

  • 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-13T09:12:21+00:00Added an answer on June 13, 2026 at 9:12 am

    You can overload functions like this but the two function have a different signature, i.e., during linking it will fail. I’m not sure what you try to achieve but it might work to delegate:

    void PrintLines(char cv, int cc, int lc) {
        PrintLines(int(cv), cc, lc);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making this function that takes a string input, converts it to an int,
While making a project with Makefile, I get this error: error: implicit declaration of
I have searched all over the web with no luck of making this project
I'm making this little project with fwrite (long story, and I can't use DB's).
I have an AS3 project making use of compile time constants. This has worked
I am making a project where i am drawing waveform of an audio file
I am making Titanium mobile project where I want to make one global function
This project is literally making me lose sleep. I think about it all day
I have a little problem, I'm making project and I'm sending data from client
I'm making a project for my work, and there is a big problem... I'm

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.