Solved

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

Posted on 2004-03-26
2
260 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now