changing text

Posts 16–24 of 24 · Page 2 of 2
here's an example that you could use

Code:
' Sample for String.Copy()
Imports System

Class Sample

   Public Shared Sub Main()
      Dim str1 As String = "abc"
      Dim str2 As String = "xyz"
      Console.WriteLine("1) str1 = '{0}'", str1)
      Console.WriteLine("2) str2 = '{0}'", str2)
      Console.WriteLine("Copy...")
      str2 = [String].Copy(str1)
      Console.WriteLine("3) str1 = '{0}'", str1)
      Console.WriteLine("4) str2 = '{0}'", str2)
   End Sub 'Main
End Class 'Sample
'
'This example produces the following results:
'1) str1 = 'abc'
'2) str2 = 'xyz'
'Copy...
'3) str1 = 'abc'
'4) str2 = 'abc'
'
source : String.Copy Method

Credits goes to Microsoft.com (and Google?)

and don't thank me but thanks microsoft.com
oh it's for vb if you're doing it in vb.
i need for c++ but thank you for sharing i have an idea for vb hack and this is helping me much so i will press thanks

i found it there is the code using namespace System;
int main()
{
String^ str1 = "abc";
String^ str2 = "xyz";
Console::WriteLine( "1) str1 = '{0}'", str1 );
Console::WriteLine( "2) str2 = '{0}'", str2 );
Console::WriteLine( "Copy..." );
str2 = String::Copy( str1 );
Console::WriteLine( "3) str1 = '{0}'", str1 );
Console::WriteLine( "4) str2 = '{0}'", str2 );
}
watch out this code is for c++ .net

for strcpy it's like that :

Code:
strcpy(old_server_name, "UltraPGNoob Server"); // can be any other thing you want to name it
yes you will need to create a base.
but if you really wanna progress you will do it by ur own way.
C++ Sample:

Code:
// Sample for String::Copy()
using namespace System;
int main()
{
   String^ str1 = "abc";
   String^ str2 = "xyz";
   Console::WriteLine( "1) str1 = '{0}'", str1 );
   Console::WriteLine( "2) str2 = '{0}'", str2 );
   Console::WriteLine( "Copy..." );
   str2 = String::Copy( str1 );
   Console::WriteLine( "3) str1 = '{0}'", str1 );
   Console::WriteLine( "4) str2 = '{0}'", str2 );
}

/*
This example produces the following results:
1) str1 = 'abc'
2) str2 = 'xyz'
Copy...
3) str1 = 'abc'
4) str2 = 'abc'
*/
very goood

ggggggggod
Yeah..People who leech doesnt know how to make stuff by themselfs...
There is many ways..
You can use memcpy...strcpy...you can even do it without using those functions..
Posts 16–24 of 24 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us