Click here to Skip to main content
15,923,845 members
Articles / Programming Languages / C++

How to interpret complex C/C++ declarations

Rate me:
Please Sign up or sign in to vote.
4.73/5 (162 votes)
3 Jul 2004CPOL7 min read 609K   223  
Ever came across a declaration like int * (* (*fp1) (int) ) [10]; or something similar that you couldn't fathom? This article will teach you to interpret such complex C/C++ declarations, including the use of typedef, const, and function pointers.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Business Analyst
India India
Vikram is a 20-something bloke working in Madras (aka Chennai), India. Vikram was born in Madras, brought up in Coimbatore, and is now back in Madras. He loves listening to music, reading and watching cricket. He hates cats.

Vikram joined CP way back in 2002 when he was in college and had papers on Windows programming. In his past lives, he languished around, roaming the wilderness of Solaris, eventually moving on to writing software for managing ATMs in .NET. He now works as a Business Analyst who dabbles in SQL for an investment bank, working with applications for structured products.

He "loves everyone" for whatever that is worth. And he rather makes a big deal out of the fact that he's ambidextrous....

Comments and Discussions