mirror of
https://github.com/guilhermewerner/rust-ffi
synced 2025-06-16 05:44:19 +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