Solved

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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 pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

911 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

21 Experts available now in Live!

Get 1:1 Help Now