|
-
April 27th, 2009, 12:31 PM
#16
Re: Homework Function Help.
The compiler is right. Check your spelling carefully.
-
April 27th, 2009, 12:41 PM
#17
Re: Homework Function Help.
You need a main function.
-
April 27th, 2009, 01:12 PM
#18
Re: Homework Function Help.
there is a main function, but i'm not in charge of that. This is a group project and my job is these 3 functions
-
April 27th, 2009, 01:33 PM
#19
Re: Homework Function Help.
 Originally Posted by Poeticsoul44
there is a main function, but i'm not in charge of that. This is a group project and my job is these 3 functions
Did you follow my advice in post #16?
-
April 29th, 2009, 09:25 AM
#20
Re: Homework Function Help.
I think your teacher is trying to teach you the importance of coffee. Wake up!
Spelling things correctly isn't always important, but spelling variables the SAME is. ;p
-
April 29th, 2009, 03:33 PM
#21
Re: Homework Function Help.
 Originally Posted by Poeticsoul44
I just included "using namespace std;" and get these errors:
1st:
air.cpp: In function âvoid airfare(double&, double&)â:
air.cpp:7: error: âairefareAllowedâ was not declared in this scope
air.cpp:7: error: âairefareCostâ was not declared in this scope
2nd:
miles.cpp: In function âvoid milage(int, double&, double&)â:
miles.cpp:4: error: âcoutâ was not declared in this scope
miles.cpp:4: error: âendlâ was not declared in this scope
miles.cpp:5: error: âcinâ was not declared in this scope
3rd:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
(1) Pay more attention to spelling. airefareAllowed != airfareAllowed
(2) You can compile but you cannot link your program unless you have a function with the signature "int main () or int main (int, char**).
(3) If you aren't responsible for main, write your own int main(void) that does some testing on your part of the code. Comment it out before you sent it to your collaborators.
(4) New programmers should not collaborate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|