Thread: is there an equivalent to python data types in C?

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    25

    is there an equivalent to python data types in C?

    i'm used to working with python data types, such as lists, tuples, dictionaries, pickles, and so on. will these concepts transfer over to C? if so, please point me to a tutorial or some documentation.

    thanks

  2. #2
    Registered User Sake's Avatar
    Join Date
    Jan 2005
    Posts
    89
    Wouldn't you rather learn C than Python with C syntax? I can understand what you want from a concept standpoint, but it won't help you that much in learning C, and can potentially hurt you when it comes to learning proper C.
    Kampai!

  3. #3
    Handy Andy andyhunter's Avatar
    Join Date
    Dec 2004
    Posts
    540
    C is a "low" high level language so all of its native data types are the basics, aka int, double, char, ect. To do anything beyond that involves the use of structures , arrays , an other abstract data types such as linked lists and binary trees. Look for prelude's corner under the FAQ .
    i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced

    It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah

    Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    The "concepts" can transfer over, but you'll have to program the data structures yourself

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    25
    thanks for the replies. that was just the type of info i was looking for andyhunter.

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    25
    sake,

    yes, i would rather learn C than python with C syntax. so what do you do when you have the need for those types of objects? do you know of any books or online docs that discuss high-level techniques for programming in C? so far i've only been reading about low-level syntax details and it's hard to get the big picture about what's really possible.

  7. #7
    Registered User Sake's Avatar
    Join Date
    Jan 2005
    Posts
    89
    >>do you know of any books or online docs that discuss high-level techniques for programming in C?
    This is a good place to get started if you aren't sure what's available. You can spend a lot of time learning the data structures listed there. In the end, just about everything is derived from simple stuff: arrays, structures, and pointers. It's how you put them together that gives you linked lists and binary trees and hash tables.
    Kampai!

  8. #8
    Registered User
    Join Date
    Dec 2004
    Posts
    25
    thanks for the link.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extending basic data types.
    By nempo in forum C++ Programming
    Replies: 23
    Last Post: 09-25-2007, 03:28 PM
  2. Replies: 4
    Last Post: 06-14-2005, 05:45 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM
  5. Using enumerated data types
    By SXO in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2001, 06:26 PM