cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Prototype vs Function declaration, const
Prototype vs Function declaration, const
May 8, 2011 at 5:01pm UTC
takutox
(2)
in the prototype declaration for a method i did not declare that an argument was const
however in the actual method header i declared that it was const
does this still make the argument in the function const even though i did not define this in the prototype?
May 8, 2011 at 8:20pm UTC
Disch
(13742)
The compiler will treat them as two entirely different functions. If you attempt to call the prototyped version, you will get a linker error because that function has no body.
Topic archived. No new replies allowed.