File Inclusion

This is a discussion on File Inclusion within the C Programming forums, part of the General Programming Boards category; using TURBO C... I need to include file2 in file1 but, I get an error like this "Unable to open ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    1

    Smile File Inclusion

    using TURBO C... I need to include file2 in file1 but, I get an error like this "Unable to open include file 'file2.c' ". Please help me.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Welcome to the forum, Harsha!

    Are you putting file2 in the TC directory, or in the TC\BIN directory? Post the include line of code.

  3. #3
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    You shouldn't be using *antique* compiler like turbo C.
    Leave where it belongs... and move on.
    You can try gcc or MSVC...

  4. #4
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Bayint Naung View Post
    You shouldn't be using *antique* compiler like turbo C.
    Leave where it belongs... and move on.
    You can try gcc or MSVC...
    Nonsense, TC is still trendy , just ask Adak.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory Leak in AppWizard-Generated Code
    By jrohde in forum Windows Programming
    Replies: 4
    Last Post: 05-19-2010, 04:24 PM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21