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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:56:57+00:00 2026-06-03T08:56:57+00:00

As a professional C# programmer learning C++, I would like to keep data types

  • 0

As a professional C# programmer learning C++, I would like to keep data types the same as in C#. I wrote a header file that should help with this. What I want to know is if it is correct.

// boolean
//#DEFINE bool char
//#DEFINE true 0x01
//#DEFINE false 0x00

// 8-bit integers
#DEFINE byte unsigned char
#DEFINE UInt8 unsigned char
#DEFINE Byte unsigned char
#DEFINE sbyte char
#DEFINE Int8 char
#DEFINE SByte char

// 16-bit integers
#DEFINE ushort unsigned short int
#DEFINE UInt16 unsigned short int
#DEFINE short short int
#DEFINE Int16 short int

// 32-bit integers
#DEFINE uint unsigned int
#DEFINE UInt32 unsigned int
//#DEFINE int int
#DEFINE Int32 int

// 64-bit integers
#DEFINE long long long
#DEFINE Int64 long long
#DEFINE ulong unsigned long long
#DEFINE UInt64 unsigned long long

// 32-bit floating point
//#DEFINE float float
#DEFINE Single float

// 64-bit floating point
//#DEFINE double double
#DEFINE Double double
  • 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-03T08:56:58+00:00Added an answer on June 3, 2026 at 8:56 am

    Aside from the horrendous style, these macros don’t even work the way you expect.

    #define long long long
    

    is prone to all sorts of problems.

    http://ideone.com/Jg9DK

    Reversing the order of the macro definitions doesn’t fix the problem completely either.

    http://ideone.com/45wUS

    Similar problems occur with

    #define short short int
    

    http://ideone.com/dERGm

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

Sidebar

Related Questions

Possible Duplicate: Should I learn C before learning C++? As a professional (Java) programmer
Should every C++ programmer read the ISO standard to become professional?
There are lots of websites or blogs said that we should keep 80 characters
I'm a professional C programmer. I'm learning device drivers and want to write (and
I am not a professional java script programmer. I hope you can help me.
I would like to hear from you folks that have achieved a high-level of
I am not professional programmer so i can not be sure about this.How many
First, let me say I'm not a professional programmer, but an engineer who had
Why do many professional web developers always insist on developing sites that accommodate for
As a young professional in .Net, I noticed that there are plenty of .Net

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.