S
Steven Livingstone
If I was using C# and wanted to call the printf function what would I do?
Specifically i want to convert a string to octal and as there is no facility
for doing this in C# i figured i'd look at using C++. Even better would be a
function that returns me a string or char array to C# when i call C++ rather
than printing it out.
I can get it working by calling VB from C#, but with C++ i am finding it a
little tricky!
Psuedocode below....
static void Main(string[] args)
{
char[] instr = Console.ReadLine().ToCharArray();
char[] outstr;
unsafe
{
outstr = ConvertToOctalHere(instr);
}
Console.WriteLine(outstr);
Console.ReadLine();
}
thanks,
Steven.
Specifically i want to convert a string to octal and as there is no facility
for doing this in C# i figured i'd look at using C++. Even better would be a
function that returns me a string or char array to C# when i call C++ rather
than printing it out.
I can get it working by calling VB from C#, but with C++ i am finding it a
little tricky!
Psuedocode below....
static void Main(string[] args)
{
char[] instr = Console.ReadLine().ToCharArray();
char[] outstr;
unsafe
{
outstr = ConvertToOctalHere(instr);
}
Console.WriteLine(outstr);
Console.ReadLine();
}
thanks,
Steven.