Posted by 세모아
,

Visual C++의 .NET 프로그래밍

How to: Parse Strings Using the Split Method (C++/CLI)


Example


// regex_split.cpp

// compile with: /clr

using namespace System;


int main(array<System::String ^> ^args)

//가능함. int main()

{

   String^ delimStr = " ,.:\t";

   Console::WriteLine( "delimiter : '{0}'", delimStr );

   array<Char>^ delimiter = delimStr->ToCharArray( );

   array<String^>^ words;

   String^ line = "one\ttwo three:four,five six seven";


   Console::WriteLine( "text : '{0}'", line );

   words = line->Split( delimiter );

   Console::WriteLine( "Number of Words : {0}", words->Length );

   for (int word=0; word<words->Length; word++)

      Console::WriteLine( "{0}", words[word] );


   return 0;

}

결과

delimiter : ' ,.:       '

text : 'one     two three:four,five six seven'

Number of Words : 7

one

two

three

four

five

six

seven



Posted by 세모아
,
C++/CLI Console 프로그램 코드에서
 MessageBox 사용시 다음 에러 발생하면 해결책은?
 - 에러 : /LNK2028: unresolved token(0A00003D) "extern "C" int __stdcall MessageBoxW .....
 - 해결책 : Edit your project properties, find the Linker Inputs option,
             and add kernel32.lib user32.lib advapi32.lib which are the usual libraries needed by Win32 code.


Posted by 세모아
,

CLR - Windows Forms Application이 VC++2013에는 없음.


참고 : 

이를 해결하는 편법이 인터넷에 있음. 내 Delicious에 저장함

아래가 그 링크임

http://mcn-www.jwu.ac.jp/~yokamoto/openwww/vsg/VCpp2012FormApp/


아래가 위 링크의 내용을 pdf로 저장.

VC++2010



VC++2013


Posted by 세모아
,