mirror of
https://github.com/guilhermewerner/rust-ffi
synced 2025-11-08 13:06:27 +00:00
Add String Conversion Function
This commit is contained in:
@@ -6,6 +6,15 @@ using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
// Hello
|
||||
char *result = Library::Hello("C++");
|
||||
|
||||
cout << result << "\n";
|
||||
|
||||
Library::DeallocString(result);
|
||||
|
||||
// Operations
|
||||
|
||||
int num1 = 1;
|
||||
int num2 = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user