G
Guest
INF: Has anyone made a CString, sprintf, and sscanf for .NET?
Please help,
I want to code with PURE .NET (i.e. pure CLR). No MFC, No ATL, no C-Run Time
Library. But I want CString, sprintf, and sscanf. The "String" class in .NET
is completely worthless to me, especially its so called "Format" method. In
fact to just, harp on how "lacking" it is to me, in C++.NET, one can NOT do
this:
String *csTest;
csTest = "Hello";
csTest += "!!!"; // ==> This generates an error...
This generates these compile errors:
error C2297: '+=' : illegal, right operand has type 'const char [4]'
cannot perform pointer arithmetic on __gc pointer 'System::String __gc *'
With that said, PLEASE DO NOT RESPOND TO THIS ISSUE IN REGARDS TO DOING
ANYTHING WITH .NET "String". ACCEPT IT. IT LEAVES A LOT FOR ME TO DESIRE.
So. Before I go down the road to making my own CString class for C++.NET,
has anyone by chance made one already? How about the sprintf and sscanf
functions?
Please help,
I want to code with PURE .NET (i.e. pure CLR). No MFC, No ATL, no C-Run Time
Library. But I want CString, sprintf, and sscanf. The "String" class in .NET
is completely worthless to me, especially its so called "Format" method. In
fact to just, harp on how "lacking" it is to me, in C++.NET, one can NOT do
this:
String *csTest;
csTest = "Hello";
csTest += "!!!"; // ==> This generates an error...
This generates these compile errors:
error C2297: '+=' : illegal, right operand has type 'const char [4]'
cannot perform pointer arithmetic on __gc pointer 'System::String __gc *'
With that said, PLEASE DO NOT RESPOND TO THIS ISSUE IN REGARDS TO DOING
ANYTHING WITH .NET "String". ACCEPT IT. IT LEAVES A LOT FOR ME TO DESIRE.
So. Before I go down the road to making my own CString class for C++.NET,
has anyone by chance made one already? How about the sprintf and sscanf
functions?