Thread: Help learning C programming

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    2

    Help learning C programming

    I could use a lot of help learning C programming.

    I use Ubuntu Mate and gcc as my compiler.

    I was able to get some simple code compiled.

    But with some other code, it could not find some header files like
    conio.h, etc.

    How do I install additional header files?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,091
    Quote Originally Posted by fixit7
    But with some other code, it could not find some header files like
    conio.h, etc.
    conio.h is a pre-standard header that never became standard, and where it might still be available, it would more likely be available for Windows (due to the DOS legacy) rather than Linux. You most likely do not need it anyway, e.g., perhaps the functionality that you are looking for may be available in a library like ncurses.

    Quote Originally Posted by fixit7
    How do I install additional header files?
    Unless you're dealing with a header-only library, which is rare in C, you would be installing libraries, not just the header files. The "how" depends on the library, e.g., on Linux perhaps the library is available in your Linux distro's software repositories, or perhaps you might download the source code and do a ./configure, make, make install dance, or perhaps it uses some other build system, or perhaps you don't even need to install the library: SQLite distributes a header file with an "amalgamation" mega source file that you can copy over to your C source code and compile alongside your other source files, including the header where needed.
    Last edited by laserlight; 08-26-2020 at 05:32 PM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Programming Learning Curve
    By Freddie_Fred in forum C Programming
    Replies: 17
    Last Post: 11-13-2017, 12:05 AM
  2. Learning C Programming
    By Manakore in forum C Programming
    Replies: 5
    Last Post: 02-08-2011, 05:32 PM
  3. Learning programming in England
    By Akkernight in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 02-06-2009, 07:13 PM
  4. How are you learning programming?
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 63
    Last Post: 02-13-2002, 05:13 PM
  5. Why are you learning programming?
    By Betazep in forum A Brief History of Cprogramming.com
    Replies: 71
    Last Post: 02-01-2002, 07:18 PM

Tags for this Thread