这个程序是C的还是C++的

来源:百度知道 编辑:UC知道 时间:2024/05/11 03:05:50
#include <windows.h>
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("HelloWin") ;
HWND hwnd ;
MSG msg ;
WNDCLASwndclass ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground= (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuNam = NULL ;
wndclass.lpszClassName= szAppName ;
if

// 这个是单行注释
/**/ 这是多行注释
不懂就不要乱说
这段代码整个就一面向过程,哪儿来的C++,还有,一般来讲只要是一个专业的程序员在写C++的时候不会在加载库文件的时候使用C风格。
include<windows.h>是典型的C风格

hwnd = CreateWindow( szAppName, // window class name

从注释语句可判断是C++程序
因为C语言注释为/*

这是C语言,我们就正在学C++,同时对C语言也学过一些

//我是来打酱油的。

c的.
windows.h调用了windows自带的API函数.

C