CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2022
    Posts
    3

    Built in Data Types Support in C and C++

    Hello Everyone, I am learning C++ programming and working on a freelance project. I want to know which programing language supports built-in data types between C and C++ programming. I checked on interviewbit, C supports built-in data types. C is a basic version of a programming language and supports only primitive, fixed data types but not an idea about C++ Programming. Can anyone suggest me? which is more suitable for small projects?

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,633

    Re: Built in Data Types Support in C and C++

    Your question isn't clear. Both languages have build in datatypes. Neither is a really good choice for small projects.

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,662

    Re: Built in Data Types Support in C and C++

    For the C++ in-built intrinsic types see:
    https://en.cppreference.com/w/cpp/language/types

    Which language(s) may be suitable for which projects can depend upon the project and existing programming knowledge.
    To provide further guidance, some information re the project would be useful.

    You mention that you are learning C++. How far have you progressed? C++ is a quite complex language (although originally based upon c) and to be productive can require many, many months of study and practice to become productive and efficient in the language.
    Last edited by 2kaud; July 28th, 2022 at 05:13 AM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.3.4)

  4. #4
    Join Date
    Feb 2017
    Posts
    661

    Re: Built in Data Types Support in C and C++

    If it is a general programming project, it is better to use C++, even if it is a small project. With C++, you have C at the baseline but gain the benefits of a modern language. You get a substantial standard library and support for object orientation, functional programming, and generics.

    C natively supports only the primitive data types such as integers, characters, and floating points. The primitives are part of C++ as well, but in addition, you may introduce your own data types thanks to the class and enum concepts. Furthermore, the C++ standard library supplies many advanced data types. It includes dynamic arrays, hash tables, stacks, sets, queues, strings, iterators, complex numbers, tuples, dates, clocks, smart pointers, atomics, mutexes, semaphores, and so on.

    As they say, if using C is not obvious, go for C++ . Using a C++ compiler, you can start with C and then venture into C++ at your own pace.
    Last edited by wolle; August 4th, 2022 at 02:24 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured