有关VC中的数据类型的问题,请各位高手指点(一个C++初学者)(给20分)

caocao81 2003-10-19 08:33:12
各位高手,我是一个C++初学者,在看<<Windows程序设计>>时遇到一个问题有点不解.
1.<<Windows程序设计>>一书在讲解时采用的编译环境是VC,那应当是C++了,只是我以前所知道的是C++中的数据类型仅有一些基本的数据类型,如char,int,float,但书中出现较多的类型(我也不能确定是新的类型或者是结构体)如DCHAR,LRESULT,CALLBACK等等.我想知道,C++中有多少种基本的数据类型?有哪些是常用的结构体?
2.各位高手,对于看<<Windows程序设计>>一书有什么好的建议?
十分感谢!
...全文
41 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
caocao81 2003-10-19
  • 打赏
  • 举报
回复
TO:hotness28(小左),既然有些是C++这种语言所具有一数据类型,有些是VC这种环境所有的数据类型,我该如何区分呢?因为我记得C++中的基本数据类型没几种嘛
ssbelle 2003-10-19
  • 打赏
  • 举报
回复
因为windows很大 它定义了很多自己的数据类型和结构体
  • 打赏
  • 举报
回复
同意,看来楼主还没分清C++/VC++的区别。
一个是语言,一个是环境。

C++语法好比国家法律。
VC 语法好比公司规定。
你要在VC公司工作,就要不违反国家法律,还不能违反公司规定。
pinghell 2003-10-19
  • 打赏
  • 举报
回复
我帖点e文的吧,比较简单,应该看的懂的
Data Types
This topic lists the data types most commonly used in the Microsoft Foundation Class Library. Most of the data types are exactly the same as those in the Windows Software Development Kit (SDK), while others are unique to MFC.

Commonly used Windows SDK and MFC data types are as follows:

BOOL A Boolean value.


BSTR A 32-bit character pointer.


BYTE An 8-bit integer that is not signed.


COLORREF A 32-bit value used as a color value.


DWORD A 32-bit unsigned integer or the address of a segment and its associated offset.


LONG A 32-bit signed integer.


LPARAM A 32-bit value passed as a parameter to a window procedure or callback function.


LPCSTR A 32-bit pointer to a constant character string.


LPSTR A 32-bit pointer to a character string.


LPCTSTR A 32-bit pointer to a constant character string that is portable for Unicode and DBCS.


LPTSTR A 32-bit pointer to a character string that is portable for Unicode and DBCS.


LPVOID A 32-bit pointer to an unspecified type.


LRESULT A 32-bit value returned from a window procedure or callback function.


UINT A 16-bit unsigned integer on Windows versions 3.0 and 3.1; a 32-bit unsigned integer on Win32.


WNDPROC A 32-bit pointer to a window procedure.


WORD A 16-bit unsigned integer.


WPARAM A value passed as a parameter to a window procedure or callback function: 16 bits on Windows versions 3.0 and 3.1; 32 bits on Win32.
Data types unique to the Microsoft Foundation Class Library include the following:

POSITION A value used to denote the position of an element in a collection; used by MFC collection classes.


LPCRECT A 32-bit pointer to a constant (nonmodifiable) RECT structure.
hotness28 2003-10-19
  • 打赏
  • 举报
回复
<<Windows程序设计>>是很不错的书,因为有很多人在看
其实你学一段时间你就知道你应该看什么样的书
不要为这个烦恼,因为学好vc你要看很多书
我现在还是一头雾水呢,太庞大了
hotness28 2003-10-19
  • 打赏
  • 举报
回复
我帮你回答把
1 DCHAR,LRESULT,CALLBACK这些数据类型是微软定义的在vc环境下使用的
而不是c++基本数据类型
有些的差不多的,例如INT和int是一样的
都写成大写,比较规范一些,因为int看起来好象c语言的东西,不是很正规
CALLBACK是回调函数,vc自己定义的,到c++builder中可能就不能用了
就象mfc一样,是vc环境下的


  • 打赏
  • 举报
回复
其实,都是一些基本数据类型的变体。

看看MSDN就知道了。
或者直接把光标定位在那里,按右键,查看它的定义。
ironjie 2003-10-19
  • 打赏
  • 举报
回复
等待回复,我也想知道。以前C++没学过,现在刚开始

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧