Win32 Console Application demo程序

xiaoxiao2021-02-28  106

// console01.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdlib.h> int _tmain(int argc, _TCHAR* argv[]) {     printf("helloworld\n");     system("pause");     return 0; }

// console03.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) {     char *str = NULL;     printf("helloworld\n");     cout<<"helloworld"<<endl;     str = (char *)malloc(1024);     if (NULL == str) {         printf("malloc error\n");         while (1);     }     cin>>str;     printf("str = %s\n", str);     system("pause");     return 0; }

转载请注明原文地址: https://www.6miu.com/read-39553.html

最新回复(0)