Subscription removed. Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile. C R An initialization shall not appear if object-name is a dummy argument, a function result, an object in a named common block unless the type declaration is in a block data program unit, an object in blank common, an allocatable variable, or an automatic object.
In the second case, the compiler notices you are trying to SAVE a dummy argument, which is not allowed. But it should also reject the initialization.
Computer Architecture. Computer Network. Database DBMS. Learn SQL. Practice SQL. More Tutorials Game Development. GO Language. GIT Guide. Linux Guide. Spring Framework. Learn C Language. Core Java. Computer Science. What are Deadlocks? MongoDB vs. Interactive Courses, where you Learn by doing. Available for FREE! Tutorials Library. MCQ Tests. Learn Coding! Declaring, Initializing and using a pointer variable in C.
C Interview Tests New tests added every Week. Learn more. How to initialize a pointer to null [closed] Ask Question. Asked 7 years, 4 months ago. Active 7 years, 4 months ago. Viewed 6k times. Improve this question. Nikos Athanasiou. Nikos Athanasiou Nikos Athanasiou NULL must be nullptr or a zero-valued integer literal, to be convertible to any pointer type. Don't forget the naked literal zero: 0 , 0L , 0LL , 0u , 0ul and 0ull.
Show 9 more comments. Active Oldest Votes. With the standard changes, there might be a shift to nullptr.
0コメント