|
|
#1 |
|
Fully Optimized
|
Alright I'm just starting this programming class and I'm not sure where I messed up on this code. Any help on getting it to build correctly would be appreciated!
PHP Code:
1>Lab1C.cpp(15): error C2059: syntax error : ')' 1>Lab1C.cpp(16): error C2143: syntax error : missing ';' before '{' 1>Lab1C.cpp(16): error C2447: '{' : missing function header (old-style formal list?) 1> 1>Build FAILED. |
|
|
|
|
|
#2 |
|
Site Team
Join Date: Jul 2009
Posts: 2,627
|
Code:
// gather input
<< "What was your weekly sales? ";
__________________
Save the whales, feed the hungry, free the mallocs. |
|
|
|
|
|
#3 | |
|
Fully Optimized
|
Quote:
1>Lab1C.cpp(15): error C2059: syntax error : ')' 1>Lab1C.cpp(16): error C2143: syntax error : missing ';' before '{' 1>Lab1C.cpp(16): error C2447: '{' : missing function header (old-style formal list?) |
|
|
|
|
|
|
#4 |
|
In Runtime
Join Date: Sep 2010
Posts: 240
|
This may sound very daft, im only a beginner, but i cant see the main() function, dont you have to use one of these?
|
|
|
|
|
|
#5 |
|
Solid State Member
|
|
|
|
|
|
|
#6 |
|
Fully Optimized
|
Thanks for the input guys and you were correct about the main () function. I ended up getting that working correctly but couldn't figure out how to convert a string to a double so the code as I wrote above was useless. I ended up getting everything working correctly by modding my code some and removing the string
![]() PHP Code:
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|