Visual C++ .NET/Development/printf s

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Using printf_s to output message

<source lang="csharp">

  1. include "stdafx.h"

using namespace System;

  1. include <stdio.h>

int main() {

  String^ str = "managed string";
  // The string is automatically converted to a
  // char array for printf_s
  printf_s("%s", str );

}

 </source>