How to create source file and header file in Xcode?

Someone please help!
I have just learn about class. Now I want to make that class become a library in which I can use in a program. I do not know where in the application file (where is the main part) I can create a interface file and implementation file?
I use Xcode.
Last edited on
File->New->File...

Then choose whatever file you want in dialogue. If you're creating .mm/.cpp files you can have it automatically create a .hpp file for you.

If you want to make a framework or library, then when you create your project, choose either (Cocoa|Cocoa Touch|TV|Watch - depending on your platform) Framework or Library to create a target within your project.
When I create an interface file and implementation file, there is another file .hpp is automatically created. Can someone explains for me what is that file for and meaned.
Also in that file I saw this.

//
// vectordouble.hpp
// fun
//
// Created by *** *** on 4/25/16.
// Copyright © 2016 Lance Dang. All rights reserved.
//

#ifndef vectordouble_hpp
#define vectordouble_hpp

#include <stdio.h> // What does this header mean??????????????????????????

#endif /* vectordouble_hpp */


Topic archived. No new replies allowed.