how to compile c++ program when we r using two different functions which are defined in different file(s) under same directory in linux gcc???
csayantan
0
Newbie Poster
Recommended Answers
Jump to Postgcc file1.cpp file2.cpp -o PROGRAM-Name
I guess something like that would do, Where Program-Name is the desired name of the program and file1 and file2 are your 2 different files(Dont forget to add the path).
However, It might put up some error's due to the order …
Jump to Post>how to compile c++ program when we r using two different functions which are defined in different file(s) under same directory in linux gcc???
First look at Sky Diploma's post.
Second:
Well, I would type:[B]g++[/B] -o [I]outputfile[/I] [I]file1.cpp[/I] [ [I]file2.cpp[/I] ] [ file[I]x[/I].cpp ]
The square brackets …
Jump to PostUnderstand what exactly #include<header.h> does:
It simply copy-paste the content of header.txt and replaces it with the line containing #include<header.h>
Say, if you have a header.h with the following :+--header.h---------------------------------+ +-------------------------------------------+ | Sticks and Stones can break my bones. | | But they can't break my …
All 10 Replies
Sky Diploma
571
Practically a Posting Shark
mvmalderen
2,072
Postaholic
onaclov2000
mvmalderen
2,072
Postaholic
mvmalderen
2,072
Postaholic
ganbree
7
Light Poster
onaclov2000
siddhant3s
1,429
Practically a Posting Shark
Salem
commented:
Excellent post, truly excellent.
+36
Nick Evan
commented:
I agree... You've got too much free time :)
+21
mvmalderen
commented:
Maybe not posting much (in you signature), but when your post, the result is always of high quality :)
+13
onaclov2000
Tom Gunn
1,164
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.