I am using a function pointer variable named as "stream. SO i think it might create errors if it is a reserved keyword in c or c++. Thanks in advance.
No, stream
is not a keyword in either C or C++. See the accepted answer to Why is "array" marked as a reserved word in Visual-C++?
However, as pointed out by @pmg, this is not the whole story. Identifiers starting with str
followed by a lowercase letter are reserved by the C standard for additional string functions. The gcc
manual provides a handy list of identifiers to be avoided.
As other answers say stream is not a keyword.
However it IS technically a reserved identifier - all identifiers starting with str followed by a lower case letter are reserved for future additions to string.h
So in theory there's a possibility that a future version of C could introduce a standard function called stream and thus break your code. However the actual chance of that happening is probably tiny.
精彩评论