|
From: David M. <ci...@ya...> - 2002-04-10 05:41:47
|
I got it to work by moving the declaration above the implementation
all you have to do is move
> extern "C"
> {
> int CeFunction();
> }
to just above
> int CeFunction()
> {
> printf("In C mode.\n");
> return 0;
> }
--- Kenneth Armstrong <dig...@ho...> wrote:
> i tried to make a program that uses both c and c++ commands. well,
> i'm new
> to this so it didn't work. the error that i got was "call of
> overloaded
> 'CeFunction()' is ambiguous". here's my code:
>
> #include <stdio.h>
> #include <iostream.h>
>
> int CeFunction()
> {
> printf("In C mode.\n");
> return 0;
> }
>
> extern "C"
> {
> int CeFunction();
> }
>
> int main()
> {
> cout << "In C++ mode.\n";
> CeFunction();
> cout << "Back in C++ mode.\n";
> return 0;
> }
>
> if someone could explain what i did wrong here i would be very
> thankful. go
> easy on me please, i'm a newb. :)
>
>
>
> _________________________________________________________________
> Join the worlds largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
|