473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Header file

How can I define my own header file?(I use linux,but when I use sine or
cosine and etc. I faced to error,so I read the header file but there
wasn't any prototype of that functions,so I decided to write my own
header file,but I don't know anything about the header files.Please
help me)

Nov 15 '05 #1
7 2334

<pa****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
How can I define my own header file?
Just define it. You can use any editor
capable of saving a 'plain text' file.
(I use linux,
Your operating system is irrelevant when using
a platform-neutral language such as C.
but when I use sine or
cosine and etc.
There are no functions with those names the the
C standard library. Perhaps you meant 'sin' and
'cos'?
I faced to error,
What error? Show the code that gives the error.
so I read the header file
WHich header file?
but there
wasn't any prototype of that functions
Not in standard C library.
,so I decided to write my own
header file,
Now you're just guessing. Never a good idea.
but I don't know anything about the header files.
Get some books. See book reviews at www.accu.org for ideas.
Please
help me)


The standard functions 'cos()' and 'sin()' are declared
by standard header <math.h>

-Mike
Nov 15 '05 #2
On Fri, 21 Oct 2005 22:12:58 -0700, paytam wrote:
How can I define my own header file?(I use linux,but when I use sine or
cosine and etc. I faced to error,so I read the header file but there
wasn't any prototype of that functions,so I decided to write my own
header file,but I don't know anything about the header files.Please
help me)


If the libraries for the trig math functions don't exist, there's no point
writing header files for them. If the libraries do exist, it's likely
that the header files do too and you simply need to find them in the
filesystem and direct your compiler to them (but if they genuinely don't,
we can help you to write/download them).

To find out what's really going on, post the exact error message, the
shortest complete version of the exact code causing it and the exact
command by which you're invoking your compiler.

--
http://members.dodo.com.au/~netocrat
Nov 15 '05 #3
I know that I must include math.h and use sin() and cos() functions,but
my main questions are
1) why in linux operating system there were not any trig function.I
used Red hat and Mandriva and debian but in all the header file was not
okay,I know that this is not relevant to OS
2) What should I write in that header file to work properly?

Nov 15 '05 #4
pa****@gmail.com writes:
I know that I must include math.h and use sin() and cos() functions,but
my main questions are
1) why in linux operating system there were not any trig function.I
used Red hat and Mandriva and debian but in all the header file was not
okay,I know that this is not relevant to OS
2) What should I write in that header file to work properly?


The C standard provides several trig functions, including sin() and
cos(), declared in <math.h>. Any conforming C implementation will
support these. I've never seen a Linux system that didn't have a
conforming C implementation (possibly with some minor bugs), assuming
that gcc is installed.

What *exactly* do you mean when you say "in linux operating system
there were not any trig function"? What happens when you try to use
them? What makes you think "the header file was not okay"?

The C FAQ is at <http://www.eskimo.com/~scs/C-faq/faq.html>. You
might take a look at question 14.3.

If that *is* the problem, you could have saved yourself and the rest
of us a lot of time by showing us exactly what you tried and exactly
what happened when you tried it.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #5
Hi Man
Actually The Linux gcc as well as cc compilers give errors ..........
So just use the g++ compiler and check that .......

Nov 15 '05 #6
np*********@gmail.com wrote:
Hi Man
Actually The Linux gcc as well as cc compilers give errors ..........
So just use the g++ compiler and check that .......


Whatever the hell you're responding to (a secret because you quote no
context), g++ is *not* an acceptable answer in <news:comp.lang.c>. g++
is a C++ compiler, and C++ is *not* C. The C compiler in that suite is gcc.
Nov 15 '05 #7
pa****@gmail.com wrote:

How can I define my own header file?
(I use linux,but when I use sine or
cosine and etc. I faced to error,so I read the header file but there
wasn't any prototype of that functions,so I decided to write my own
header file,but I don't know anything about the header files.Please
help me)


I'm guessing this might be your kind of problem:

http://www.eskimo.com/~scs/C-faq/q14.3.html

--
pete
Nov 15 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Mantoulidis | last post by:
Seperate compilation (that's what it's called, right?) seems to be quite popular, so I decided to get some info about it, and (d'oh) use it... But it's whole structure seems weird to me... ...
31
by: Steven T. Hatton | last post by:
If a header is not necessarily a source file, and the sequences delimited by < and > in header names aren't necessarily valid source file names, what exactly is a header? -- p->m == (*p).m == p.m...
16
by: matthurne | last post by:
I just started learning C++ on my own...I'm using Accelerated C++. Something it hasn't explained and I keep wondering about is how header files actually work. I suspect it doesn't get into it...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
4
by: Andrew Ward | last post by:
Hi All, I was wondering if it is possible to use precompiled headers without having to include a <stdafx.h> or whatever in every source file. My problem is that I have a project that makes heavy...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
16
by: wdh3rd | last post by:
Hi everyone. I'm new to C and I have a few questions: I am making files for permutations and combinations. Files to be made are perm.c, perm.h, combo.c, and combo.h. Since both combinations...
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
1
by: Proogeren | last post by:
I have a problem with a httpwebrequest that I am creating. The request in itself looks correct but using fiddler I see that a www-authentication header is sent along as well. The code is pasted...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.