Advertisement

A small question about C vs C++

Started by September 07, 2000 10:13 PM
4 comments, last by ZebMacahan 24 years, 3 months ago
Woulb be glad if anyone could help me with this question... "C++ has type safe linkage, in other words it checks the parameters of a function call against the function definition and reports differences as errors. On the other hand C does not automatically check if the parameters in a function call in one file are the same as the parameters of the definition in another file. How would you make sure problems of incorrect functions calls are caught at compile time?" Any ideas are appricated /Zeb
First you would tell us what compiler you are using! There''s probably an option, commandline switch or pragma you can enable to get type safe linkage.
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
Advertisement
Visual Studio 6.0
MSVC?
well it should automatically do that then...
That is a C++ Compiler.

------------------------------
#pragma twice


sharewaregames.20m.com

with msvc its all dependant on how u link it, at leastthats my experience . eg if u compile c stuff it''ll obey the c conventions ie no checking, and if u compile c++ it''ll check and obey the typesafe rules

This topic is closed to new replies.

Advertisement