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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:46:26+00:00 2026-05-14T00:46:26+00:00

C files renamed to C++ are going to be compilable with C++ compilers after

  • 0

C files renamed to C++ are going to be compilable with C++ compilers after renaming?
So I have 25 C files and 1 C++ file I do not want to create Make files or anething like that. I want to turn all that C files into C++ so will simple renaming work or what shall I do?

  • 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-14T00:46:27+00:00Added an answer on May 14, 2026 at 12:46 am

    In general, yes. You will have to worry about variables named class and such, the sizeof a character literal, and name mangling, and some other rarely encountered issues. If you’re converting C99 to C++, you’ll have to drop some C99 features.

    With regards to name mangling, reference any C symbols by using extern "C". A common idiom is:

    #ifdef __cplusplus
    extern "C" {
    #endif
    
    extern int myGlobal;
    extern int myFunction(void);
    /* etc */
    
    #ifdef __cplusplus
    }
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Rehsarper 4.0 - Renaming a class does not rename the file… I probably set
Is there any way of batch renaming files in sub directories? For example: Rename
I'm writing an application that uses renaming rules to rename a list of files
I want to include a batch file rename functionality in my application. A user
I have a file I need to rename to that of an existing file.
What is the best way, using Bash, to rename files in the form: (foo1,
I am trying to rename all the files present in a Windows directory using
Is there an easy way to rename a group of files already contained in
How can I use SMO to rename the physical .mdf .ndf .ldf files. This
If a file system task such as a rename fails, for example if the

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.