Fix a bug where the Mercury calls C++ sample was actually using C, not C++.

Estimated hours taken: 0.25
Branches: main

Fix a bug where the Mercury calls C++ sample was actually using C, not C++.

samples/c_interface/mercury_calls_cplusplus/cpp_main.c:
samples/c_interface/mercury_calls_cplusplus/cpp_main.cc:
	Rename cpp_main.c as cpp_main.cc, so that it gets compiled as C++
	code rather than as C code.  Add a dummy class declaration to its
	source, to check that it is really C++ code.
This commit is contained in:
Fergus Henderson
2003-10-08 12:15:44 +00:00
parent 9db60d3411
commit c880e31dbe
2 changed files with 12 additions and 7 deletions

View File

@@ -1,7 +0,0 @@
#include <stdio.h>
#include "cpp_main.h"
void cpp_main(void) {
printf("In cpp_main().\n");
}

View File

@@ -0,0 +1,12 @@
// This source file is hereby placed in the public domain. -fjh (the author).
#include <stdio.h>
#include "cpp_main.h"
// Use some C++ features
class Foo { };
void cpp_main(void) {
printf("In cpp_main().\n");
}