#include <iostream>
void foo();
#pragma managed
using namespace System;
int main(array<System::String ^> ^args)
{
foo();
Console::WriteLine(sizeof(char) + " : sizeof(char) in main");
Console::WriteLine(sizeof(System::Char) + " : sizeof(System::Char) in main");
return EXIT_SUCCESS;
}
#pragma unmanaged
using namespace std;
void foo()
{
cout << sizeof(char) << " : sizeof(char) in foo" << endl;
}
void foo();
#pragma managed
using namespace System;
int main(array<System::String ^> ^args)
{
foo();
Console::WriteLine(sizeof(char) + " : sizeof(char) in main");
Console::WriteLine(sizeof(System::Char) + " : sizeof(System::Char) in main");
return EXIT_SUCCESS;
}
#pragma unmanaged
using namespace std;
void foo()
{
cout << sizeof(char) << " : sizeof(char) in foo" << endl;
}
'Code > C C++' 카테고리의 다른 글
| [MFC] Simplest MFC Program (0) | 2010.04.23 |
|---|---|
| [C++] Regular Expressions Class: regex (0) | 2010.04.18 |
| [C++/CLI] #pragma managed, #pragma unmanaged, Windows API (0) | 2009.05.09 |
| [C++] 16진수 문자열을 2진수 문자열로 변환 (0) | 2009.04.19 |
| [MFC] CString Sample (0) | 2009.03.17 |
SampleCLR.zip