logo
down
shadow

how to call a function of another file without including that file


how to call a function of another file without including that file

Content Index :

how to call a function of another file without including that file
Tag : php , By : Praetoriansentry
Date : November 25 2020, 07:22 PM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Defining the function in C/C++ file and including repective file in header


Tag : cpp , By : Stephen Judge
Date : March 29 2020, 07:55 AM
it helps some times Yes it is bad practice if you are including that header in multiple areas. So what an include does is this: Whenever a compiler sees a #include, what it does is take all that code that is located in that area and insert it where that #include is. Now if you are compiling multiple cpp files together, or #including files that #include the same file. This inserts that chunk of code multiple times which increases the size of your program unnecessarily. Another good practice is using in the header files the #ifndef...#endif for large programs. It would look like this:
Say i have a person.h file coded as
#ifndef PERSON_H_
#define PERSON_H_

#include <stdio.h>
#include <stdlib.h>

typedef char NAME[41];

typedef struct date {
    int month;
    int day;
    int year;
} DATE;

typedef struct person {
    NAME name;
    int age;
    float height;
    DATE bday;
} PERSON;
#endif
char *BoyerMoore_skip(char *, int );
char *BoyerMoore_skip(char *string, int strLength);

Including another php file inside ajax call works but javascript file doesn't load


Tag : javascript , By : sep
Date : March 29 2020, 07:55 AM
like below fixes the issue Ajax not load
shadow
Privacy Policy - Terms - Contact Us © scrbit.com