相关疑难解决方法(0)

C中最常见的命名约定是什么?

C中常用的命名约定是什么?我知道至少有两个:

  1. 具有lower_case_functions的GNU/linux/K&R
  2. ?名称 ?使用UpperCaseFoo函数

我只在这里谈论C.我们的大多数项目都是使用C的小型嵌入式系统.

这是我计划用于下一个项目的那个:


C命名惯例

Struct              TitleCase
Struct Members      lower_case or lowerCase

Enum                ETitleCase
Enum Members        ALL_CAPS or lowerCase

Public functions    pfx_TitleCase (pfx = two or three letter module prefix)
Private functions   TitleCase
Trivial variables   i,x,n,f etc...
Local variables     lower_case or lowerCase
Global variables    g_lowerCase or g_lower_case (searchable by g_ prefix)
Run Code Online (Sandbox Code Playgroud)

c naming-conventions

114
推荐指数
8
解决办法
14万
查看次数

Win32/MFC与C++的命名约定

我正在开发一个使用Win32/MFC框架和使用Visual Studio 2010的C++编程语言的应用程序.

我的问题是哪个命名约定需要用于变量,函数名,类名等.我听说微软建议使用"匈牙利表示法"命名约定.

能告诉我哪个标准可以使用吗?

c++ winapi mfc visual-studio-2010

1
推荐指数
1
解决办法
3478
查看次数

标签 统计

c ×1

c++ ×1

mfc ×1

naming-conventions ×1

visual-studio-2010 ×1

winapi ×1