473,385 Members | 1,782 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,385 software developers and data experts.

how to combine more than two programs....

15
i have written a program in C for RPN calculator. In this i have made four function and a main ( ) and stored in same file. But now i have stored each function in a different C file and one header file and want to run it.
So i am getting some errors. My doubt is that whether i have to run each file before i run Main file OR whether i should make headre file more than one.
I have stored all file in the same folder. Help me !! or suggest me some reference!!!
Thankyou
cworld
Feb 2 '07 #1
6 7363
Create a project and add all source files and header files..... and run the project
Feb 2 '07 #2
horace1
1,510 Expert 1GB
i have written a program in C for RPN calculator. In this i have made four function and a main ( ) and stored in same file. But now i have stored each function in a different C file and one header file and want to run it.
So i am getting some errors. My doubt is that whether i have to run each file before i run Main file OR whether i should make headre file more than one.
I have stored all file in the same folder. Help me !! or suggest me some reference!!!
Thankyou
cworld
the simplest way is to put function prototypes for all the functions in your C files in the header and include the header in all the C files. Do you have global variables which are used by functions in different files, if so you declare them extern in the header. have a look at
http://www.cs.cf.ac.uk/Dave/C/node35.html

which compiler are you using?
Feb 2 '07 #3
cworld
15
Create a project and add all source files and header files..... and run the project
thankyou sir
i will try it now.
Feb 2 '07 #4
cworld
15
the simplest way is to put function prototypes for all the functions in your C files in the header and include the header in all the C files. Do you have global variables which are used by functions in different files, if so you declare them extern in the header. have a look at
http://www.cs.cf.ac.uk/Dave/C/node35.html

which compiler are you using?
Thankyou sir,
I am using VC++.I will declare the variable in header file as extern variable. It means i need one header file in which i can declare variables then include the header file in each file. So then do i need to compile each program separately other than main file.
thankyou in advance to clear my doubt once again.
cworld
Feb 2 '07 #5
horace1
1,510 Expert 1GB
Thankyou sir,
I am using VC++.I will declare the variable in header file as extern variable. It means i need one header file in which i can declare variables then include the header file in each file. So then do i need to compile each program separately other than main file.
thankyou in advance to clear my doubt once again.
cworld
I don't use VC but I assume you have to create a project which contains the C and C++ source file. When you tell the compiler to build the project it should compile all files that are not up to date and link them. Perhaps a VC expert can advidse here?
Feb 2 '07 #6
cworld
15
I don't use VC but I assume you have to create a project which contains the C and C++ source file. When you tell the compiler to build the project it should compile all files that are not up to date and link them. Perhaps a VC expert can advidse here?
thanx
i will check it out.
Feb 2 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
2
by: Henro V | last post by:
Can I integrate 3 existing forms (all based on the same query) integrate in one form by using Tab's? Thanx for thinking, Henro
5
by: Jamie Pittman via AccessMonster.com | last post by:
I have two tables with 5000 entries on them. One is based for regular time with several variables example (employee name, date,time in and out, code, customer, building) I have another table that...
66
by: Mitchell S. Honnert | last post by:
In some recent posts, I've seen people who seem to be waxing nostalgic with respect to the "ease of use" of Visual Basic 6. I can't quite put my finger on it, but they seem to be implying that VB6...
6
by: :) | last post by:
How to combine serveral large .txt files in C# without using MS command line. Thanks!!
6
by: Luvin lunch | last post by:
Hi, I'm new to access and am very wary of dates as I have limited experience in their manipulation and I know if they're not done properly things can turn ugly quickly. I would like to use a...
9
by: Abandoned | last post by:
Hi.. dict1={1: 4, 3: 5}... and 2 millions element dict2={3: 3, 8: 6}... and 3 millions element I want to combine dict1 and dict2 and i don't want to use FOR because i need to performance. ...
7
by: Sanny | last post by:
I have an app in Java. It works fine. Some people say Java works as fast as C. Is that true? C can use assembly language programs. How much faster are they inplace of calling general routines. ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.