English 中文(简体)
视力演播室2008年,未发现yn合物错误
原标题:Visual studio 2008 not catching a syntax error

Visual studio 2008 isn t catching syntax errors. for example: Tpc_feed(void); compiles fine. this: Tpc_feed(void);;;;;;; compiles fine, but this Tpc_feed(void) catches an error. Are the extra semi-colons not syntax errors? I m on Windows 7 32 bit and VS C++ 2008

最佳回答

从技术上讲,它是一种yn错,但大多数汇编者却允许它取得任何进展。 海湾合作委员会甚至允许它缺席,除非你用<代码>-pedantic汇编。

无论如何,这不符合标准,因此,你应当从外逃。

问题回答

如果没有返回类型,他们中没有一个人应当汇编为C++。 加上一种回归类型,在成员职务申报中允许有额外的半殖民地,但如果申报不属于它们所禁止的类别/结构。

我不相信VC++有旗帜,迫使他们被记为错误。

Edit: 实际上(背后和重新检查物品),在成员职能definition后,允许出现不必要的半殖民地,但我认为你有权这样做,并且不允许其履行成员职能claration<>。

正如其他人已经说过的那样,它不是一个有效的C++。 为什么许多编汇人支持这项工作,其原因是,它使创造宏观环境变得比起更容易/更具有吸引力,因此认为:

// Declares a function, and because the semicolon belongs to the declaration, the macro adds it
#define MY_FUNCTION_DECL(returnType, arguments) returnType myFunction arguments;

// Calling macros looks like functions, the semicolon looks natural
MY_FUNCTION_DECL(void, (int, int, int));  // There are two semicolons now

这个例子有些令人望而却步,因为我现在就把这个例子摆在桌面上,但它应当代表接受更多半殖民地的主张。





相关问题
how to reliable capture display setting changed

static void Main() { // Set the SystemEvents class to receive event notification when a user // when display settings change. SystemEvents.DisplaySettingsChanged += new ...

Why use CComBSTR instead of just passing a WCHAR*?

I m new to COM. What exactly is the advantage of replacing: L"String" with CComBSTR(L"String") I can see a changelist in the COM part of my .NET application where all strings are replaced in this ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Statically linking Winsock?

I m using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I m looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll. How can I ...