Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to slice C functions #1

Open
gzrjzcx opened this issue Jan 17, 2019 · 0 comments
Open

How to slice C functions #1

gzrjzcx opened this issue Jan 17, 2019 · 0 comments

Comments

@gzrjzcx
Copy link
Owner

gzrjzcx commented Jan 17, 2019

  1. When coding with C language, typically we use head file to define global functions. If there is no necessary for one function to be called by other package, this function should be defined at implementation file(.cpp file) to avoid exposed to others.

  2. In terms of the head files, it is necessary that using:

#ifndef __NAME_H__
#define __NAME_H__
...
#endif //__NAME_H__

Using this syntax to avoid the variables are re-defined when multiple .cpp files include a same .h file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant