![]() |
|
#1
|
|||
|
|||
Compile Errors due to Default ParametersI am receiving compile errors on a function that I am trying to use default parameters on. I do not understand why I am getting these errors. Code and compile errors are listed below:
//stocktank.h CPP / C++ / C Code:
//stocktank.cpp CPP / C++ / C Code:
//driver.cpp CPP / C++ / C Code:
The compile error I am receiving is below, in driver.cpp Compiling... driver.cpp c:\documents and settings\jerry brinegar\desktop\cp278 - visual c++\cp 287b c++\brinegarp3\driver.cpp(60) : error C2144: syntax error : missing ')' before type 'int' c:\documents and settings\jerry brinegar\desktop\cp278 - visual c++\cp 287b c++\brinegarp3\driver.cpp(60) : error C2660: 'SetTankDataRectangle' : function does not take 0 parameters c:\documents and settings\jerry brinegar\desktop\cp278 - visual c++\cp 287b c++\brinegarp3\driver.cpp(60) : error C2059: syntax error : ')' Error executing cl.exe. driver.obj - 3 error(s), 0 warning(s) I don't understand why it states that my function SetTankDataRectangle doesn't take 0 parameters. Thank you for any assistance. |
|||
|
#2
|
|||
|
|||
Re: Compile Errors due to Default ParametersThe declaration of the function should include the types of the parameters. When calling the function from driver.cpp, you need to actually provide values.
|
Recent GIDBlog
Planned Network Maintenance on 2013-05-29 by gidnetwork
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compile errors | earachefl | C++ Forum | 3 | 24-Feb-2006 16:49 |
| conditional compile logic | cable_guy_67 | C++ Forum | 15 | 03-Dec-2005 18:44 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 06:19 |
| Can't view pages from another machine on the Intranet | aevans | Apache Web Server Forum | 9 | 14-May-2004 02:26 |
| join problem | zuzupus | MySQL / PHP Forum | 0 | 14-Aug-2003 05:11 |
Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The