using struct keyword in variable declaration in C++

前端 未结 6 1917
暗喜
暗喜 2020-11-27 07:34

I have a feeling this may be related to C syntax, but I started my programming life with C++ so I am not sure.

Basically I have seen this:

struct tm          


        
6条回答
  •  再見小時候
    2020-11-27 07:55

    You can see the reference linked below and quoting from there "In C, you must explicitly use the struct keyword to declare a structure. In C++, this is unnecessary once the type has been defined." See the link for more information and examples.

    http://msdn.microsoft.com/en-us/library/64973255%28v=vs.80%29.aspx

提交回复
热议问题