Solved

cc inches.c gives an error - cc does not see <stdio.h>, not sure why ...

Posted on 2004-03-26
2
264 Views
Last Modified: 2010-04-15
alex /home/alex/c> more inches.c                            
/* This program converts 10 feet to inches. */                        
                                                                     
#include <stdio.h>                                                    
                                                                     
int main()                                                            
{                                                                    
        int inches, feet;                                            
                                                                     
        feet = 10;                                                    
        inches = feet * 12;                                          
        printf("There are %d inches in %d feet.\n", inches, feet);    
}                                                                    
alex /home/alex/c>            
NCR High Performance C Compiler R3.0c                                          
(c) Copyright 1994-97, NCR Corporation                                          
(c) Copyright 1987-97, MetaWare Incorporated                                    
E "inches.c",L3/C1:     Can't open "stdio.h": No such file or directory        
Unable to proceed                                                              
Aborting(21)...                                                                
                             
0
Comment
Question by:AlexF777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Assisted Solution

by:andrewjb
andrewjb earned 50 total points
ID: 10689186
You're probably missing some environmental variable to tell cc where to look for the include files...

But, sorry, don't know your platform so can't tell you more..

(Try man cc!)
(Or ask someone who's compiling OK to check env vars)
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 75 total points
ID: 10689464
Check in ur include path,whether u have stdio.h or not.
It might have got deleted or ur path is set to the wrong directory and it is not able to find
the stdio.h. file

To check this,just give any other header file name for include such as stdlib.h for e.g. or math.h

If it still gives u the same error,ur path for include files is wrong otherwise if u dont get error
for other header files,ur stdio.h has been deleted.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question