A pointer as a porameter of the function

S

santosh

Chris said:
The declarations /of the functions/, which is what I was referring
to. santosh had said, referring to your:

| int malloc_check(char *in);

this:

| Although legal, don't place declarations within functions. Place them
| outside of any function and before that function is called in the
| source file. Generally, it's good practise to declare functions and
| other objects right after the #include for header files and macro
| definitions. In larger and multi-module projects, it would be better to
| encapsulate them into a common header file and include that.

And you replied:

| Yes, I did because I placed my functions in wrong order...

to which I said:


Looking back it's probably wasn't immediately clear that it
was specifically declarations /of functions/ that santosh was
talking about.

Yes, I should've been more precise. Oh well, since then others have
clarified the confusion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top